(mydatabase)Mapper.xml
> 쿼리문 점검 (오타) -> db프로그램에 가서 직접 작성해보는게 좋음
> namespace 점검 >> 나는 이게 제일 흔했다. 대소문자 구분 꼭 해줘야함
xml파일 경로 문제
mapper.xml 파일 경로1
resources \ mapper \ ~Mapeer.xml 일 때
mybatis.mapper-locations=classpath:mapper/*.xml
mapper.xml 파일 경로2
resources \ mapper \ mapperDirectory \ ~Mapeer.xml 일 때
mybatis.mapper-locations=classpath:mapper/**/*.xml
반응형