Mybatis项目从Eclipse转入Idea无法启动问题 Mapped Statements collection does not contain value for
2017-11-02 20:12
639 查看
Mybatis-Maven项目转入IDEA
1.错误描述
Exception in thread "main" org.apache.ibatis.exceptions.PersistenceException:### Error querying database. Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for dao.UserMapper.findAll
### Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for dao.UserMapper.findAll
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:150)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:141)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:136)
at demo.Demo1.main(Demo1.java:45)
Caused by: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for dao.UserMapper.findAll
at org.apache.ibatis.session.Configuration$StrictMap.get(Configuration.java:875)
at org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:708)
at org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:701)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:147)
... 3 more
2.错误原因
3.解决问题
需要在pom.xml文件中获取对文件的引用位置。注意文件位置!!!<build> <resources> <resource> <directory>src/main/java</directory> <includes> <include>**/*.xml</include> </includes> </resource> </resources> </build>
相关文章推荐
- IDEA中配置Mybatis报出“Mapped Statements collection does not contain value for”的错误
- Mapped Statements collection does not contain value for(mybatis框架项目)
- 使用Maven构建项目,spring整合mybatis发生错误:Mapped Statements collection does not contain value for
- mybatis+spring MVC启动的时候 4000 出现Mapped Statements collection does not contain value for
- MyBatis:Mapped Statements collection does not contain value for xxx
- MyBatis中出现Mapped Statements collection does not contain value 问题
- Mybatis 出现Mapped Statements collection does not contain value for xxx
- mybatis错误 Mapped Statements collection does not contain value for
- mybatis 错误 Mapped Statements collection does not contain value for
- mybatis+springMVC整合出现Mapped Statements collection does not contain value for ***
- mybatis错误 Mapped Statements collection does not contain value for
- mybatis错误 Mapped Statements collection does not contain value for
- spring整合mybatis bug解决java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for ...
- 异常:使用mybatis框架 Mapped Statements collection does not contain value for 后面为类方法
- Mapped Statements collection does not contain value for xxxx mybatis xml maven package install
- MyBatis出现java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for
- mybatis错误 Mapped Statements collection does not contain value for
- mybatis错误 Mapped Statements collection does not contain value for
- MyBatis异常java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for
- 【Mybatis】java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for