java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for com.bjsxt.mapper.PeopleMapper

报错信息:


Type Exception Report

Description The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception

org.apache.ibatis.exceptions.PersistenceException: 
### Error querying database.  Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for com.bjsxt.mapper.PeopleMapper
### Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for com.bjsxt.mapper.PeopleMapper
	org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:26)
	org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:111)
	org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:102)
	org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:98)
	com.bjsxt.service.impl.PeopleServiceImpl.show(PeopleServiceImpl.java:21)
	com.bjsxt.servlet.ShowServlet.service(ShowServlet.java:26)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	org.apache.logging.log4j.core.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:66)

 

Root Cause

java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for com.bjsxt.mapper.PeopleMapper
	org.apache.ibatis.session.Configuration$StrictMap.get(Configuration.java:797)
	org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:631)
	org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:624)
	org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:107)
	org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:102)
	org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:98)
	com.bjsxt.service.impl.PeopleServiceImpl.show(PeopleServiceImpl.java:21)
	com.bjsxt.servlet.ShowServlet.service(ShowServlet.java:26)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	org.apache.logging.log4j.core.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:66)

错误的原因 : 在service层调用mapper的时候 只写了命名空间namespace 没有指定下面的方法selAll

 


posted on 2018-12-30 12:41  一只猪儿虫  阅读(5083)  评论(0编辑  收藏  举报