解决HTTP Status 500 - Request processing failed; nested exception is org.apache.ibatis.binding.Binding

出现HTTP Status 500 - Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): st.personal.dao.UserinfoMapper.insert

解决HTTP Status 500 - Request processing failed; nested exception is org.apache.ibatis.binding.Binding_第1张图片

根据提示信息说找不到mapper,但我配置文件都设好了,而且在test文件测试时是成功往数据库添加数据的。所以排查了application-contest.xml,spring-mvc.xml配置文件。那么根据提示就知道是数据访问层出错了,就是dao层,mapper.xml映射不到,所以重点放在排查mapper.xml就好了。

根据耐心的排查终于找到元凶了:自己写的一个id名为findUser的查询写错了。把它注解就可以了

解决HTTP Status 500 - Request processing failed; nested exception is org.apache.ibatis.binding.Binding_第2张图片

注解后重新run项目,请求没出错了,完美执行出效果。

你可能感兴趣的:(bug错误相册)