HTTP Status 500 - Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): mapper.xxxxxx.selectByPrimaryKey
使用maven进行开发测试时出现以上异常
此异常是mybatis找不到mpper的映射文件(建议在编译后的源代码文件中查看是否在一个文件目录下)
解决方案:1)可以选择将mapper接口和mepper.xml放在一个目录
2)在pom.xml文件中加入以下代码
<!-- 指定配置文件在哪个位置。 -->
<build>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</build>