08
01

Error1 

문서 루트 요소 "mapper"은(는) DOCTYPE 루트 "null"과(와) 일치해야 합니다

 

해결

mapper.xml파일에 아래 문구를 잘 넣어주었는지 확인하자

<!DOCTYPE mapper    PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"    "http://mybatis.org/dtd/mybatis-3-mapper.dtd">

 

 

Error2

org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [com.project.mylog.dao.ReviewBoardDao] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. 

 

해결

@service 어노테이션을 잘 붙였는지 확인한다

servlet-context에 <mybatis-spring:scan base-package="dao부분"/> 를 잘 넣어주었는지 확인한다

 

Error3

 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 

 

해결

xml 파일의 mapper 경로를 확인할 것

참고:https://madplay.github.io/post/mybatis-invalid-bound-statement-not-found-error

 

MyBatis 오류: Invalid bound statement (not found)

마이바티스(MyBatis) 쿼리를 실행하는 순간 'Invalid bound statement (not found)' 오류가 발생한다면?

madplay.github.io

 

Error4

 Current request is not of type [org.springframework.web.multipart.MultipartHttpServletRequest

 

해결

 

pom.xml

<dependency>
	<groupId>commons-fileupload</groupId>
	<artifactId>commons-fileupload</artifactId>
	<version>1.3.1</version>
</dependency>
<dependency>
	<groupId>commons-io</groupId>
 	<artifactId>commons-io</artifactId>
	<version>2.4</version>
</dependency>

contexts-servlet.xml

<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
	<property name="maxUploadSize" value="52428800" />
	<property name="maxInMemorySize" value="10485760" />
</bean>

확인하기

참고: https://dalili.tistory.com/168

 

Current request is not of type [org.springframework.web.multipart.MultipartHttpServletRequest]

오류 내용 파일 업로드 기능 구현에서 발생하는 오류 Current request is not of type [org.springframework.web.multipart.MultipartHttpServletRequest] ​ 원인 FrontEnd 요청이 잘못되었거나, BackEnd 요청을..

dalili.tistory.com

내 경우는 context-servlet의 bean을 주석처리해둬서 문제가 되었었다....

'Error' 카테고리의 다른 글

[sql]Error  (0) 2022.08.01
COMMENT