파닥이

[에러] java.lang.IllegalArgumentException / try using the full name including the namespace, or rename one of the entries 본문

IT/Spring

[에러] java.lang.IllegalArgumentException / try using the full name including the namespace, or rename one of the entries

알라이또 2018. 11. 2. 10:09
반응형

try using the full name including the namespace, or rename one of the entries




mybatis사용시 서로 다른 mapper에서 id값이 중복되서 나타는 현상. 


mybatis의 id를 호출해주는 쪽 (dao)에서 mapper에 namespace값을 기존 호출하는 id값 앞에 붙여주면 된다. 


예) <mapper namespace="sql_test">  

     <select id="getName"> 


이라고 가정하면


dao에서 id값 지정하는 부분에서 "sql_test.getName" 으로 해.주면 된다.


중요한건 중복된부분에 아이디값들은 다 해당 namespace값을 지정해주어야한다. 



아니면 중복되는 아이디값을 변경해주면 된다.




Comments