修改前

  <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. unittest单元测试框架中的参数化及每个用例的注释

    相信大家和我有相同的经历,在写自动化用例脚本的时候,用例的操作是一样的,但是就是参数不同,比如说要测一个付款的接口,付款有很多种渠道,另外只有部分参数不一样,如果我们一个渠道一个渠道的写,在unitt ...

  2. 覆盖的面积 HDU - 1255 (扫描线, 面积交)

    求n个矩阵面积相交的部分,和求面积并一样,不过这里需要开两个数组保存覆盖一次和覆盖两次以上的次数的部分,还是模板,主要注意点就是pushup部分,如果我已经被两次覆盖,那我的两个数组在这个root点的 ...

  3. css 多行文本的溢出显示省略号(移动端)

    多行文本的溢出显示省略号(移动端) 一.单行文本的溢出显示省略号(通用) .mui-ellipsis { overflow: hidden; /*规定当文本溢出包含元素时发生的事情*/ white-s ...

  4. Vue--组件嵌套

    1.全局注册: 组件放到components文件夹内,建议组件名是什么行为的name名就是什么 main.js 引入组件:import Users from '组件位置' 注册全局组件:Vue.com ...

  5. CF698C - LRU

    这又是什么毒瘤..... 解:把操作序列倒着来,就是考虑前k个入队的元素了.显然这样每个元素的概率不变. 状压.设fs表示当前元素为s的概率. 每次转移的时候选择一个不在s中的元素,作为下一个加入的元 ...

  6. jQuery中mouseleave和mouseout的区别详解

    很多人在使用jQuery实现鼠标悬停效果时,一般都会用到mouseover和mouseout这对事件.而在实现过程中,可能会出现一些不理想的状况. 先看下使用mouseout的效果: <p> ...

  7. 使用trash-cli防止rm -rf 误删除带来的灾难(“事前”非“事后”)

    trash-cli是一个使用 python 开发的软件包,包含 trash-put.restore-trash.trash-list.trash-empty.trash-rm等命令,我们可以通过这写命 ...

  8. qml: 多级窗口visible现象;

    多级窗口可以通过动态组件进行实现,也可以通过loader加载. 然而,在此要注意窗口显示.隐藏的顺序: 1.当窗口层级为主窗口 - 子窗口A --- 子窗口B: 这种模式, A是B的父窗口,那么在进行 ...

  9. Jz2440 环境安装

    目录 Jz2440 环境安装 Ubuntu 设置 烧写工具 交叉编译环境 使用说明 烧写特性 title: Jz2440 环境安装 tags: linux date: 2018-09-20 22:56 ...

  10. USB_4大描述符

    本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/aaa6695798/archive/2009/11/06/4776202.aspx 在USB描述符中,从上到下分为四个 ...