传入mybatis的xml为Long型时报There is no getter for property named 'VARCHAR' in
修改前
<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的更多相关文章
- 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 ...
- 【MyBatis学习06】_parameter:解决There is no getter for property named in class java.lang.String
我们知道在mybatis的映射中传参数,只能传入一个.通过#{参数名} 即可获取传入的值. Mapper接口文件: public int delete(int id) throws Exception ...
- 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 ...
- mybatis的if标签判断子类属性-There is no getter for property named 'export' in
1 <select id="findList" resultType="BndExport"> SELECT <include refid=& ...
- 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 ...
- 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 ...
- mybatis 错误: There is no getter for property named '*' in 'class java.lang.String解决
现象: mybatis mapper.xml 的sql里如果直接使用了想要传入的变量,比如: <select id="selectXx" resultType="i ...
- 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 ...
- 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 ...
随机推荐
- Bootloader升级方式一————擦、写flash在RAM中运行
在汽车ECU软件运行中,软件代码运行安全性是第一,在代码中尽可能的不要固化有flash_erase.flash_write操作存在,主要是防止当出现异常情况时,程序跑飞,误调用erase.write对 ...
- 洛谷P3975 弦论
题意:求一个串的字典序第k小的子串/本质不同第k小的子串. 解:一开始我的想法是在后缀树上找,但是不知道后缀树上的边对应的是哪些字符... 然而可以不用fail树转移,用转移边转移即可. 先建一个后缀 ...
- 【洛谷P1226 【模板】快速幂||取余运算】
题目描述 输入b,p,k的值,求b^p mod k的值.其中b,p,k*k为长整型数. 输入输出格式 输入格式: 三个整数b,p,k. 输出格式: 输出“b^p mod k=s” s为运算结果 作为初 ...
- 洛谷 P1061 Jam的计数法
传送门 题解: 相关变量解释: int s,t,w; ;//最多输出五组 int maxNum[maxn];//maxNum[i] : i 位置可以达到的最大值 char letter[maxn]; ...
- Vuex速学篇:(2)利用state保存新闻数据
回顾 以前我们在做这个新闻列表的时候,是一个写死的数据 export default{ data(){ return{ newslist:[ {newsid:"101",pubti ...
- 关于处理iis8.0中设置Request.BinaryRead 不允许操作的解决方法
iis6.0解决方案: 起初我刚开始上传的是小文件运行都是正常的,后来我弄个文件大点的上传看程序运行怎么样?就上面的问题,在网上搜索正好找到跟我一样的问题,拿过来自己记录下.其中行62指的是:oUpF ...
- Luogu P3346 [ZJOI2015]诸神眷顾的幻想乡 广义SAM 后缀自动机
题目链接 \(Click\) \(Here\) 真的是好题啊-不过在说做法之前先强调几个自己总是掉的坑点. 更新节点永远记不住往上跳\(p = fa[p]\) 新建节点永远记不住\(len[y] = ...
- (递推)codeVs1011 && 洛谷P1028 数的计算
题目描述 Description 我们要求找出具有下列性质数的个数(包含输入的自然数n): 先输入一个自然数n(n<=1000),然后对此自然数按照如下方法进行处理: 1. 不 ...
- Altium Designer 18 ------ 原理图和PCB元器件互相查找
方法一:单击选中原理图中元器件,然后单击tools>Seclect PCBcomponents,即可在PCB中看到该器件的高亮显示: 方法二:单击Tools>Cross Select Mo ...
- SVN YUM安装
一,安装: yum install subversion 二,创建配置SVN仓库: 目录自定,我这是在/home下: #cd /home # mkdir svn #svnadmin create /h ...