org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in ServletContext resource [/WEB-INF/spring/action-mybatis.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:mybatis/mappers/*.xml]: class path resource [mybatis/mappers/] cannot be resolved to URL because it does not exist
다음과 같은 오류가 발생했다. mapper의 위치 mybatis밑에 있어야는데 위치가 잘못되어 오류가 발생되었다.
mapper의 위치가 잘못되었다.
mybatis/mappers위치로 옮겨주었더니 오류가 해결되었다.
'개발 수업 > Spring' 카테고리의 다른 글
[spring] 상세보기 (0) | 2023.08.11 |
---|---|
[spring] 스프링 DB연동 과정 (0) | 2023.08.09 |
[spring] TypeAliases/sqlSession (0) | 2023.08.09 |
[spring] mybatis 환경 설정 (0) | 2023.08.09 |
[spring] model을 전달하는 방법 2가지/ModelAndView ,setViewName (0) | 2023.08.08 |