오류 : Error creating bean with name 'sqlSessionFactory'
ERROR: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in ServletContext resource
[/WEB-INF/spring/root-context.xml]: Initialization of bean failed;
nested exception is org.springframework.beans.TypeMismatchException:
Failed to convert property value of type 'java.lang.String' to required type
'org.springframework.core.io.Resource[]' for property 'mapperLocations';
nested exception is java.lang.IllegalArgumentException:
Could not resolve resource location pattern [classpath:/sqlmap/*/_SQL.xml]:
class path resource [sqlmap/] cannot be resolved to URL because it does not exist
해결
클래스패스 자료들이 [classpath:/sqlmap/**/*_SQL.xml] URL에 존재하지 않는다는 에러로서 [classpath*:/sqlmap/**/*_SQL.xml]로 *을 추가하여 복수개의 파일을 전부 찾아주면 에러가 발생하지 않는다.
'IT개발정보 > spring and java' 카테고리의 다른 글
[error] org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: (0) | 2023.02.08 |
---|---|
Spring Framework 버젼 확인 (0) | 2023.02.08 |
Spring Annotation (0) | 2023.02.07 |
클래스, 객체, 인스턴스의 개념 (0) | 2023.02.07 |
class 과 public class의 차이 (0) | 2023.02.07 |