Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for

当遇到'Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for...'的错误时,通常是由于在Mapper.xml文件中缺少对应的定义。然而,在本文的案例中,错误的根源并非如此。问题出在一个带有额外空格的XML配置常量,导致SpringBoot Druid配置初始化数据库连接时找不到相应的XML文件。这个小细节提醒我们在进行代码和配置复制粘贴时必须仔细检查。
摘要由CSDN通过智能技术生成

Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for User.pageSelect

 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 User.pageSelect
### Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for User.pageSelect
	at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:77)
	at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:446)
	at com.sun.proxy.$Proxy82.selectList(Unknown Source)
	at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:238)
	at com.wanyu.frame.base.BaseMyIbatisDao.findRowBy(BaseMyIbatisDao.java:400)
	at com.wanyu.frame.base.BaseManager.findTopOneBy(BaseManager.java:159)
	at com.wanyu.wanyuoa.controller.AdminController.login(AdminController.java:237)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:849)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.ha
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值