修改前

  <insert id="insert" parameterType="com.taotao.pojo.TbContent" >
    insert into tb_content (id, category_id, title,
      sub_title, title_desc, url,
      pic, pic2, created,
      updated, content)
    values (${id,jdbcType=BIGINT}, ${categoryId,jdbcType=BIGINT}, ${title,jdbcType=VARCHAR},
     ${subTitle,jdbcType=VARCHAR}, ${titleDesc,jdbcType=VARCHAR}, ${url,jdbcType=VARCHAR},
      ${pic,jdbcType=VARCHAR}, ${pic2,jdbcType=VARCHAR}, ${created,jdbcType=TIMESTAMP},
      ${updated,jdbcType=TIMESTAMP},${content,jdbcType=LONGVARCHAR})
  </insert>

修改后

  <insert id="insert" parameterType="com.taotao.pojo.TbContent" >
    insert into tb_content (id, category_id, title,
      sub_title, title_desc, url,
      pic, pic2, created,
      updated, content)
    values (#{id,jdbcType=BIGINT}, #{categoryId,jdbcType=BIGINT}, #{title,jdbcType=VARCHAR},
      #{subTitle,jdbcType=VARCHAR}, #{titleDesc,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR},
      #{pic,jdbcType=VARCHAR}, #{pic2,jdbcType=VARCHAR}, #{created,jdbcType=TIMESTAMP},
      #{updated,jdbcType=TIMESTAMP}, #{content,jdbcType=LONGVARCHAR})
  </insert>

主要是#{}和${}的区别 如果不懂的可以点击查看Mybatis中#{}和${}传参的区别及#和$的区别小结

传入mybatis的xml为Long型时报There is no getter for property named 'VARCHAR' in的更多相关文章

  1. Mybatis找不到参数错误:There is no getter for property named 'categoryId' in 'class java.lang.Integer'。

    Mybatis找不到参数错误:There is no getter for property named 'categoryId' in 'class java.lang.Integer'. 错误Li ...

  2. 【MyBatis学习06】_parameter:解决There is no getter for property named in class java.lang.String

    我们知道在mybatis的映射中传参数,只能传入一个.通过#{参数名} 即可获取传入的值. Mapper接口文件: public int delete(int id) throws Exception ...

  3. mybatis之org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'time' in 'class java.lang.String'

    mybatis接口 List<String> getUsedCate(String time); 配置文件 <select id="getUsedCate" pa ...

  4. mybatis的if标签判断子类属性-There is no getter for property named 'export' in

    1 <select id="findList" resultType="BndExport"> SELECT <include refid=& ...

  5. MyBatis查询传一个参数时报错:There is no getter for property named 'sleevetype' in 'class java.lang.Integer

    用MyBatis进行查询,传入参数只有一个时(非Map)如int,报错 There is no getter for property named 'sleevetype' in 'class jav ...

  6. Mybatis 传入List类型参数,报错:There is no getter for property named '__frch_item_0' in

    错误如下: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.Re ...

  7. mybatis 错误: There is no getter for property named '*' in 'class java.lang.String解决

    现象: mybatis mapper.xml 的sql里如果直接使用了想要传入的变量,比如: <select id="selectXx" resultType="i ...

  8. Mybatis笔记四:nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'id' in 'class java.lang.String'

    错误异常:nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for pr ...

  9. mybatis There is no getter for property named 'xx' in 'class java.lang.String

    转载自://http://www.cnblogs.com/anee/p/3324140.html 用mybatis查询时,传入一个字符串传参数,且进行判断时,会报 There is no getter ...

随机推荐

  1. [NOI2018]你的名字(后缀自动机+线段树)

    题目描述 小A 被选为了ION2018 的出题人,他精心准备了一道质量十分高的题目,且已经把除了题目命名以外的工作都做好了. 由于ION 已经举办了很多届,所以在题目命名上也是有规定的,ION 命题手 ...

  2. CodeFroces-- 511div2 C. Enlarge GCD

    题目链接:C. Enlarge GCD 给你一个序列 删除一些数看可以让他们之间的gcd变大如果可以输出删除数量最小的个数 先求出共同 gcd 然后除去 找出出现最多的质数 然后减去就可以了 #inc ...

  3. 绝对音乐No.1

    最近儿子在练天空之城钢琴曲.为了方便他听久石让的原版,绝对做张cd.另外加入了自己比较喜欢的几首乐曲.在家音响上聆听时发现,不管是中国乐曲,还是西洋乐,都很美,耳朵都出油了.放到网盘供喜爱之人欣赏,喜 ...

  4. sql server 2000 个人版怎么在win7下安装

    win7 64位安装SQL2000个人版教程 首先,如果以前安装的话,要删除干净.我也找了半天的网络资料. 1.把原来sqlserver的安装目录 C:\Program Files\microsoft ...

  5. bzoj1030 文本生成器

    题目链接 题意 给出\(n\)个字符串,要构造一个长度为\(m\)的字符串\(S\),使得给出的\(n\)个字符串中至少有一个是\(S\)的子串.问方案数. 思路 \(AC\)自动机+\(DP\) 考 ...

  6. MySQL填充字符串函数 LPAD(str,len,padstr),RPAD(str,len,padstr)

    转: MySQL填充字符串函数 LPAD(str,len,padstr),RPAD(str,len,padstr) LPAD(str,len,padstr) 用字符串 padstr对 str进行左边填 ...

  7. Java多线程-详细版

    基本概念解释 并发:一个处理器处理多个任务,这些任务对于处理器来说是交替运行的,每个时间点只有一个任务在进行. 并行:多个处理器处理多个任务,这些任务是同时运行的.每个时间点有多个任务同时进行. 进程 ...

  8. UI自动化学习路线

    1.web自动化 1.前端技术介绍 参考网址:http://www.w3school.com.cn/xml/xml_xsl.asp html /html5 js/jquery xml/xpath 参考 ...

  9. springcloud集成zookeeper,并使用configserver作为服务的配置中心

    1.springcloud集成zookeeper: 做法: 出现问题: 版本不一致导致出现keepError: 解决:服务器的zookeeper要与客户端的zookeeper一致,才可以. 2.使用c ...

  10. MySQL会发生死锁吗?

    SHOW ENGINE INNODB STATUS;来查看死锁日志: SHOW PROCESSLIST;查看进程 MySQL的InnoDB引擎事务有4种隔离级别,主要是为了保证数据的一致性. Inno ...