请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

报Invalid bound statement (not found)

测试login.do的时候报这个错

HTTP Status 500 - Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.mmall.dao.UserMapper.checkUsername


type Exception report

message Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.mmall.dao.UserMapper.checkUsername

description The server encountered an internal error that prevented it from fulfilling this request.


exception

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.mmall.dao.UserMapper.checkUsername
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:943)
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:833)
javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:807)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108)




正在回答 回答被采纳积分+3

2回答

提问者 wryu 2017-08-23 23:53:00

发现applicationContext-datasource.xml中的sqlSessionFactory的mapperLocations的value为classpath*:mappers/ShippingMapper.xml,改为classpath*:mappers/*Mapper.xml可以解决问题

3 回复 有任何疑惑可以回复我~
看你笑呵呵 2017-08-23 13:15:23

下次发问题代码要贴的全一点,最好把mapper上的这个方法也贴出来 = =

1.问题的话看看你的mapper.xml文件是不是在resources下面,如果不是放在resources下面试试

2.看看checkUsername有没有和dao层的方法对应上

3.检查mapper是否存在问题

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信