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

请教下你这个怎么解决的?我遇到和你一样的错误怎么都解决不了~

0
0

风间影月

2020-02-27

IllegalArgumentException 参数不对吧?

0
2
风间影月
哈哈哈哈,没想到我居然有权限在这里回复
2020-02-27
共2条回复

Java接口自动化测试实战,搞定理论基础+典型应用场景

打破传统测试用例设计方法,搞懂基于TestNG的接口自动化测试技术

2086 学习 · 920 问题

查看课程