问题描述
- spring+myBatis+maven登录报错
- 大家好,小弟不才,万般无耐,特此求助。
自己搭了一个框架,以前是普通的Web工程,可以正常启动,登录。
手贱,将之转成了Maven工程,折腾了许久,终于正常启动了,窃以为万事大吉。谁知工程有不测bug。每次我在登录页面输入用户名和密码之后,提交,报错。
报错信息片段如下:
afterThrowing
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.builder.IncompleteElementException: Could not find result map java.util.HashMap
23:28:55.618 ERROR 500.jsp - nested exception is org.apache.ibatis.builder.IncompleteElementException: Could not find result map java.util.HashMap
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.builder.IncompleteElementException: Could not find result map java.util.HashMap
... ...
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_51]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-coyote.jar:7.0.55]
at java.lang.Thread.run(Thread.java:744) [na:1.7.0_51]
Caused by: org.apache.ibatis.builder.IncompleteElementException: Could not find result map java.util.HashMap
... ...
... 76 common frames omitted
Caused by: java.lang.IllegalArgumentException: Result Maps collection does not contain value for java.util.HashMap
解决方案
这个地方的 findUserByDate 使用了 java.util.HashMap 作为 resultMap
时间: 2024-09-16 05:59:11