org.apache.ibatis.builder.IncompleteElementException: Could not find result map java.lang.Integer
2019-01-09 22:08
751 查看
如图:
详细错误信息如下:
org.apache.ibatis.builder.IncompleteElementException: Could not find result map java.lang.Integer at org.apache.ibatis.builder.MapperBuilderAssistant.getStatementResultMaps(MapperBuilderAssistant.java:346) at org.apache.ibatis.builder.MapperBuilderAssistant.addMappedStatement(MapperBuilderAssistant.java:290) at org.apache.ibatis.builder.xml.XMLStatementBuilder.parseStatementNode(XMLStatementBuilder.java:109) at org.apache.ibatis.session.Configuration.buildAllStatements(Configuration.java:788) at org.apache.ibatis.session.Configuration.hasStatement(Configuration.java:758) at org.apache.ibatis.session.Configuration.hasStatement(Configuration.java:753) ......
遇到这种问题,一般都是因为在xml中基本类型返回属性的属性名写成了resultMap。
由于Mybatis的报错的定位文件有时候不准,所以不要只看错误信息中提到的文件关联的文件,所以ctrl+alt+h 全工程内检索(可能你的全文检索不是这个快捷键),
resultMap="java.lang.Integer"(不同的人编码风格不同,有的可能会有空格,自行调整)。最后在另一个不相干的XXXmapper.xml文件中找到了这行
resultMap="java.lang.Integer"
改为:
resultType="java.lang.Integer"
注意:MyBatis的报错有时候不是很准,所以不要只看不要只看错误信息中提到的文件关联的文件。有时候可能是另一个xml导致的错误。
以上是Spring Boot启动 MyBatis报错 Could not find result map java.lang.Integer的内容,更多 的内容,请您使用右上方搜索功能获取相关信息。
相关文章推荐
- org.apache.ibatis.builder.IncompleteElementException: Could not find result map java.lang.String
- org.apache.ibatis.builder.IncompleteElementException: Could not find result map java.util.HashMap
- org.apache.ibatis.builder.IncompleteElementException: Could not find result map java.util.HashMap
- org.apache.ibatis.builder.IncompleteElementException: Could not find result map java.util.Map
- org.apache.ibatis.builder.xml.IncompleteStatementException: Could not find result map java.util.Map
- org.apache.ibatis.builder.IncompleteElementException: Could not find result map cn.itcast.ssm.po.Ite
- org.apache.ibatis.builder.IncompleteElementException: Could not find result map
- org.apache.ibatis.builder.IncompleteElementException: Could not find result map com.szh.bean.product
- org.apache.ibatis.builder.IncompleteElementException: Could not find result map
- mybatis使用bug:org.apache.ibatis.builder.IncompleteElementException: Could not find parameter map java
- org.apache.ibatis.builder.IncompleteElementException: Could not find result map
- org.apache.ibatis.builder.IncompleteElementException:Could not find result map cn.tengfei.core.dao.p
- FAQ(30):org.apache.ibatis.builder.IncompleteElementException: Could not find find result map
- 抛错HTTP Status 500 - org.apache.ibatis.builder.IncompleteElementException: Could not find result map
- org.apache.ibatis.builder.IncompleteElementException: Could not find result map xxMapper.
- org.apache.ibatis.builder.IncompleteElementException: Could not find parameter map java.util.Set
- org.apache.ibatis.builder.IncompleteElementException: Could not find result map com.juan.mapper.JaUs
- org.apache.ibatis.builder.IncompleteElementException: Could not find parameter map com.hyzn.historicalRecord.dao.ITB_HISTORYLOGDAO.TB_HISTORYLOGResultMap
- org.apache.ibatis.builder.IncompleteElementException: Could not find result map com.mplus.server.dat
- org.apache.ibatis.builder.IncompleteElementException: Could not find result map