기타/데이터베이스프로그래밍

Type interface { } is not known to the MapperRegistry.

yujindonut 2021. 12. 17. 00:34
728x90

Type interface model.dao.mybatis.mapper.Qna_CommentMapper is not known to the MapperRegistry.

 

이런 오류가 계속해서 났다! 할거 많은데!

 

체크해야할 점 두가지~!

 

1. mybatis-config.xml파일에 mapper가 잘 등록되어있는지 확인!

 

나는 되어있었다!

 

2. SqlSessionFactory에 mapper를 추가해야한다는 것!

흠 이것도 아니였다

 

3.mybatis-config.xml파일에 mapper가 잘 등록되어있는지 확인!

밑에 등록을 안해줬었다.. 나는 mapper XML과 Mapper interface를 병용해서 사용하는 것이기때문에, 둘다 등록을 해줘야하는데!!

완전 기초적인 실수..

 

==>이것도 아니였다!!!!!!!!!!!

 

 

중간에 mapper경로를 바꿔줬는데 이걸 안바꿔줌

728x90