[Error] Spring 에러 Could not resolve type alias '클래스명', Cannot find class: '클래스명'

ouneno·2023년 6월 8일
0

Error

목록 보기
4/12

Spring 실행시 Error 발생

초기 프로젝트를 생성한 후 Boot Dashboard를 run했을때 에러가 발생했다.
우선 해당 오류는 Mapper에 있는 select문을 인식하지 못해서 생기는 오류인 것으로 확인되었다.
차후 개발을 더 진행한 이후 추가적인 해결방법을 작성할 예정이다.


TypeException: Could not resolve type alias '클래스명', ClassNotFoundException: Cannot find class: 클래스명

Caused by: org.apache.ibatis.type.TypeException: Could not resolve type alias '클래스명'. Cause: java.lang.ClassNotFoundException: Cannot find class: 클래스명
at org.apache.ibatis.type.TypeAliasRegistry.resolveAlias(TypeAliasRegistry.java:128) ~[mybatis-3.5.13.jar:3.5.13]
at org.apache.ibatis.builder.BaseBuilder.resolveAlias(BaseBuilder.java:150) ~[mybatis-3.5.13.jar:3.5.13]
at org.apache.ibatis.builder.BaseBuilder.resolveClass(BaseBuilder.java:116) ~[mybatis-3.5.13.jar:3.5.13]
... 96 common frames omitted

Cannot find class: 클래스명

Caused by: java.lang.ClassNotFoundException: Cannot find class: 클래스명
at org.apache.ibatis.io.ClassLoaderWrapper.classForName(ClassLoaderWrapper.java:226) ~[mybatis-3.5.13.jar:3.5.13]
at org.apache.ibatis.io.ClassLoaderWrapper.classForName(ClassLoaderWrapper.java:103) ~[mybatis-3.5.13.jar:3.5.13]
at org.apache.ibatis.io.Resources.classForName(Resources.java:322) ~[mybatis-3.5.13.jar:3.5.13]
at org.apache.ibatis.type.TypeAliasRegistry.resolveAlias(TypeAliasRegistry.java:124) ~[mybatis-3.5.13.jar:3.5.13]
... 98 common frames omitted


원인

  • Mapper에서 select 작업시 나타날 수 있는 에러
    경로 : ../src/main/resources/mapper/mapper명.xml

해결방법

기존 Mapper에서 select 작업으로 되어져 있던 부분을 주석 처리 함

profile
지속적인 성장을 추구하는 새싹 개발자입니다🌱

0개의 댓글