mybatis错误提示Could not find result map com.sale.entity.User
2018-01-26 16:38
751 查看
一、问题描述
错误提示
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.builder.IncompleteElementException:Could not find result map com.sale.entity.User
mapper.xml代码:
二、 解决办法
将resultMap="com.sale.entity.User" 改成 resultMap="userMap",即resultMap定义的id名称。
错误提示
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.builder.IncompleteElementException:Could not find result map com.sale.entity.User
mapper.xml代码:
<resultMap id="userMap" type="com.sale.entity.User" > <id column="id" property="id" jdbcType="INTEGER" /> <result column="name" property="name" jdbcType="VARCHAR" /> <result column="sex" property="sex" jdbcType="VARCHAR" /> </resultMap> <select id="findSmallItemsBytevonumber" resultMap="com.sale.entity.User" parameterType="string"> select * from tevo_small_items where sex = #{sex,jdbcType=VARCHAR}; </select> |
将resultMap="com.sale.entity.User" 改成 resultMap="userMap",即resultMap定义的id名称。
相关文章推荐
- MyBatis(IncompleteElementException: Could not find result map com.hao.mapper.PersonTestMapper.=Base)
- Could not find result map com.lrlz.weixin.dao.SysUserDAO.SysUser
- FAQ(14):Could not find result map com.smbms.entities.User
- mybatis 错误解决Could not find parameter map
- org.apache.ibatis.builder.IncompleteElementException: Could not find result map com.mplus.server.dat
- MyBatis项目查询数据库Could not find result map java.lang.String
- mybatis错误——java.io.IOException: Could not find resource com/xxx/xxxMapper.xml
- Could not find result map com.rmyy.web.model.Department] with root cause
- mybatis IncompleteElementException:Could not find result map java.lang.String
- mybatis错误:Could not resolve resource location pattern [classpath:com/demon/user/mapper/*.xml]: class
- Could not find result map 错误
- org.apache.ibatis.builder.IncompleteElementException: Could not find parameter map com.hyzn.historicalRecord.dao.ITB_HISTORYLOGDAO.TB_HISTORYLOGResultMap
- Could not find parameter map com.itcast.mapper.userinfMapper.map
- org.apache.ibatis.builder.IncompleteElementException: Could not find result map com.szh.bean.product
- Could not find a getter for userState in class com.zj.entity.Users
- Mybatis——Invalid bound statement (not found)-Could not find result map java.lang.Integer
- mybatis错误——java.io.IOException: Could not find resource com/xxx/xxxMapper.xml
- mybatis异常:Could not find result map java.util.Map 问题分析及解决
- Mybatis Could not find result map java.lang.Intege
- mybatis错误——java.io.IOException: Could not find resource com/xxx/xxxMapper.xml