HTTP Status 500 - Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.lxb.say.mapper.UserMapper.selectUserById
因为没有将mapper.xml打包进去
解决步骤1.
在pom中的对应位置添加配置
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
本文详细解析了HTTPStatus500错误中关于MyBatis BindingException的具体原因,即Mapper XML文件未被正确打包到项目中,并提供了解决步骤。主要是在Maven的pom.xml中配置资源文件,确保所有必要的XML文件能够被包含在最终的构建产物中。

1万+

被折叠的 条评论
为什么被折叠?



