반응형
결론
pom.xml 파일에
build 태그 안에 아래 소스를 넣어주니 해결되었다.
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
</resource>
</resources>
이 에러 때문에 한참을 헤맸다.
구글링을 해봐도 namespace나 classpath가 잘못되었다는 정보들만 나왔고
나는 꼬박 하루를 잘못 적었거나 오타가 있나 확인했지만 해결하지 못했다.
그러다
mapper가 제대로 mapping이 되지 않았다는 글을 보고
순간 어? 하고 target폴더를 보니
정말 mapper가 build 되어 있지 않았다.
왜지?
평소대로 똑같이 했는데 왜 안될까를 다시 고민하다가 소스를 보니
평소에는 mapper를 resource 폴더 밑에 만들었었는데
새로 할당받은 프로젝트는 interface 부분에 mapper가 있었던 것이다.
왜 이상하다고 생각하지 않았을까
처음 언급했던 것처럼 pom.xml 에 resource 경로를 추가하였더니 정상적으로 작동했다.
다른분들은 다 eclipse로 셋팅해서 사용중이셨고
해당 문제는 Intellij에서만 나타나는 것 같았다.
IDE마다 설정이 다른걸 새삼 느꼈다.
출처
https://redcoder.tistory.com/184
https://okky.kr/article/289087
반응형
'개발자의 삶 > IntelliJ' 카테고리의 다른 글
[Intellij] invalid source release: 11 (0) | 2022.06.07 |
---|---|
Port already in use : 1099; (0) | 2021.03.02 |
intellij 오류 : 에이전트에 예외가 발생했습니다. (0) | 2018.05.02 |