使用Spring mybatis时,访问页面报错“java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for GetPageLanguages”,是因为mapper的xml没有生成在对应的路径,因为maven项目的xml自动生成在resources中,所以需要在maven pom.xml中添加内容:
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
<!-- 是否替换资源中的属性-->
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
转载于:https://my.oschina.net/duojin/blog/1795590