qq_梦中虔诚_03693510
2016-07-21 10:59
在换成Mybatis之前程序能正常运行,换了之后一直报错,
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="Message">
<resultMap type="com.imooc.bean.Message" id="MessageResult">
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="command" jdbcType="VARCHAR" property="command"/>
<result column="description" jdbcType="VARCHAR" property="description.encrypted"/>
<result column="content" jdbcType="VARCHAR" property="content"/>
</resultMap>
<select id="queryMessageList" resultMap="MessageResult">
SELECT
id,
command,
description,
content
FROM message
WHERE 1 = 1
</select>
</mapper>
### The error may involve Message.queryMessageList
### The error occurred while handling results
### SQL: SELECT id, command, description, content FROM message WHERE 1 = 1
### Cause: org.apache.ibatis.reflection.ReflectionException: Could not set property 'encrypted' of 'class java.lang.String' with value '精彩内容' Cause: org.apache.ibatis.reflection.ReflectionException: There is no setter for property named 'encrypted' in 'class java.lang.String'
找到错误了。。。<result column="description" jdbcType="VARCHAR" property="description.encrypted"/>
多了.encrypted
通过自动回复机器人学Mybatis---基础版
107414 学习 · 831 问题
相似问题