错误提示“加密”?

来源:3-2 SQL 基本配置与执行

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'

写回答 关注

1回答

  • qq_梦中虔诚_03693510
    2016-07-21 11:46:56

    找到错误了。。。<result column="description" jdbcType="VARCHAR" property="description.encrypted"/>

    多了.encrypted

通过自动回复机器人学Mybatis---基础版

微信公众号自动回复功能学习Mybatis,基础教程加案例实战方式学习

107414 学习 · 831 问题

查看课程

相似问题