现象:

mybatis mapper.xml 的sql里如果直接使用了想要传入的变量,比如:

<select id="selectXx" resultType="int" statementType="STATEMENT">
SELECT COUNT(*)
FROM B_PERSON
WHERE
${columnName} != ''
</select>

会出现 There is no getter for property named '*' in 'class java.lang.String错误

原因及解决方案:

参见http://blog.csdn.net/qing_gee/article/details/47122227

另外,想到是因为找不到参数,所以尝试了下,在mapper接口方法里加上@Param(value = "该字段名")参数。结果发现这种方法也是可行的

mybatis 错误: There is no getter for property named '*' in 'class java.lang.String解决的更多相关文章

  1. Mybatis查询报错:There is no getter for property named '*' in 'class java.lang.String

    问题: 执行查询时报错:There is no getter for property named '*' in 'class java.lang.String 原因: 传过去的参数为识别.本例为 p ...

  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. _parameter:解决There is no getter for property named in class java.lang.String

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

  4. Mybatis 报错 There is no getter for property named '***' in 'class java.lang.String'

    在mapper.xml中 , 如果单参数是String类型 , 且在sql语句中对参数进行了判断 , 如下 when 中的判断 , 如果出现 if 判断也是一样的.都需要把判断中的参数用 _param ...

  5. mybatis There is no getter for property named '*' in 'class java.lang.String

    1.原因 server层     xxxx.get("1234") map <if test="aaa != null and aaa.id != null and ...

  6. mybatis 异常 There is no getter for property named 'bizId' in 'class java.lang.Long'

    mybatis 异常 There is no getter for property named 'bizId' in 'class java.lang.Long' 当使用mybatis进行传参的时候 ...

  7. Java 异常 Failed to convert property value of type 'java.lang.String' to required type 'java.util.Date'

    查询时发送给服务器的日期的字符串格式:yyyy-MM-dd HH:mm:ss 服务器接收到日期的字符串之后,向 MySQL 数据库发起查询时,因为没有指定日期时间格式,导致字符串数据不能正确地转换为日 ...

  8. spring mvc出现 Failed to convert property value of type 'java.lang.String' to required type 'java.util.Date' for property 'endtime'

    在使用spring mvc中,绑定页面传递时间字符串数据给Date类型是出错: Failed to convert property value of type [java.lang.String] ...

  9. 【spring mvc】后台API查询接口,get请求,后台Date字段接收前台String类型的时间,报错default message [Failed to convert property value of type 'java.lang.String' to required type 'java.util.Date' for property 'createDate';

    后台API查询接口,get请求,后台Date字段接收前台String类型的时间筛选条件 后台接口接收 使用的实体 而createDate字段在后台实体中是Date类型 报错信息: org.spring ...

随机推荐

  1. Hbase Scan的重要参数

    Scan是操作Hbase中非常常用的一个操作,虽然前面的Hbase API操作简单的介绍了Scan的操作,但不够详细,由于Scan非常常用,关于其详细的整理也是很有必要的. Scan HBase中的数 ...

  2. SpringMVC中的参数绑定总结

    众所周知,springmvc是用来处理页面的一些请求,然后将数据再通过视图返回给用户的,前面的几篇博文中使用的都是静态数据,为了能快速入门springmvc,在这一篇博文中,我将总结一下springm ...

  3. UVA-10570 Meeting with Aliens (枚举+贪心)

    题目大意:将一个1~n的环形排列变成升序的,最少需要几次操作?每次操作可以交换任意两个数字. 题目分析:枚举出1的位置.贪心策略:每次操作都保证至少一个数字交换到正确位置上. # include< ...

  4. IOS UI-QQ好友列表

    一.Model // // FriendsModel.h // IOS_0111_好友列表 // // Created by ma c on 16/1/11. // Copyright (c) 201 ...

  5. openfalcon源码分析之graph

    openfalcon源码分析之graph 本节内容 graph功能 graph源码分析 2.1 graph中重要的数据结构 2.2 graph的简要流程图 2.3 graph处理数据过程 2.4 gr ...

  6. 根据马甲、应用商店、统计每天的注册量,要求可以根据选择马甲和app,马甲和appstrore和user_login不同表问题

    这个马甲属于一个表,appStore另一张表,用户登录表,主要操作的就是这三个表. 我这里的马甲和app的id都与用户登录表中的channel对应,在channel存放的是majiaId + “|” ...

  7. java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind 【 解决方案】

    当我们在启动tomcat服务的时候报错信息:java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bin 分析:从错 ...

  8. Oozie_04总结一下workflowf的运行流程【20161116】

    4.1 bin/oozie ..... 提交任务 [hadoop@hadoop01 oozie-4.0.0-cdh5.3.6]$ bin/oozie job -oozie http://hadoop0 ...

  9. swift3.0  代码创建经典界面的九宫图--优化篇

    在上一篇只是简单实现了九宫图效果,本章需要形成APP界面九宫图效果 override func viewDidLoad() { super.viewDidLoad() createnine() } / ...

  10. python pandas.DataFrame .loc,.iloc,.ix 用法

    refer to: http://www.cnblogs.com/harvey888/p/6006200.html