Spring+Mybatis报错
-
问题:
java.lang.IllegalArgumentException: Mapped Statements collection does not cotain values. -
报错原因: IDEA默认不加载src/main/java下的XML代码
-
解决方案: 在pom文件中加上下边一句话即可完美解决
<build> <resources> <resource> <directory>src/main/java</directory> <includes> <include>**/*.xml</include> </includes> </resource> <resource> <directory>src/main/resources</directory> </resource> </resources> </build>