11-2 使用mybatis+SpringBoot完成第一个查询demo--请教老师
来源:11-2 使用mybatis+SpringBoot完成第一个查询demo

慕雪3403953
2020-02-24
2020-02-24 12:19:41.442 [http-nio-8080-exec-1] INFO org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet’
2020-02-24 12:19:41.443 [http-nio-8080-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet’
2020-02-24 12:19:41.451 [http-nio-8080-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 8 ms
2020-02-24 12:20:07.386 [http-nio-8080-exec-4] ERROR o.a.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
Error querying database. Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for getUserCount
Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for getUserCount] with root cause
java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for getUserCount
at org.apache.ibatis.session.Configuration$StrictMap.get(Configuration.java:888)
at org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:721)
at org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:714)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:147)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:141)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:77)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:71)
a
2回答
-
慕九州5122850
2021-12-16
请教下你这个怎么解决的?我遇到和你一样的错误怎么都解决不了~
00 -
风间影月
2020-02-27
IllegalArgumentException 参数不对吧?
022020-02-27
相似问题