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" parameterType="java.lang.String" resultType="java.lang.String">
     select distinct(cate.cate_name) from account as acc left join conCategory as cate on acc.cateCode=cate.cate_code
     where time like ‘${time}%‘
  </select>

报错

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

解决方法

接口改为

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

原文地址:https://www.cnblogs.com/aeolian/p/9238027.html

时间: 2024-08-03 16:57:55

mybatis之org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'time' in 'class java.lang.String'的相关文章

org.apache.ibatis.reflection.ReflectionException: There is no getter for property named &#39;parentId&#39; in &#39;class java.lang.String&#39;

Caused by: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'parentId' in 'class java.lang.String' at org.apache.ibatis.reflection.Reflector.getGetInvoker(Reflector.java:333) at org.apache.ibatis.reflection.Meta

Caused by: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named &#39;zoneId&#39; in &#39;class java.lang.String&#39;

本文为博主原创,未经允许不得而转载: 异常展示: dao层定义的接口为: public int getClientTotal(); 在mybatis中的sql为: <select id="getClientTotal" parameterType="String" resultType="Integer"> SELECT COUNT(*) AS oldNum FROM tbl__client_info <where> &l

org.apache.ibatis.reflection.ReflectionException: There is no getter for property named &#39;fundId&#39; in &#39;class java.lang.Integer&#39;

Struts Problem Report Struts has detected an unhandled exception: Messages: There is no getter for property named 'fundId' in 'class java.lang.Integer' nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for prope

Error querying database. Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named &#39;ItemsCustom&#39; in &#39;class com.pojo.OrderDetailCustom

再用 junit 测试MyBatis时发现的错误: org.apache.ibatis.exceptions.PersistenceException: ### Error querying database.  Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'ItemsCustom' in 'class com.pojo.OrderDetailCust

Mybatis问题:There is no getter for property named &#39;unitId&#39; in &#39;class java.lang.String&#39;

Mybatis遇到的问题 问题: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'unitId' in 'class java.lang.String' at org.mybatis.spring.MyBatisExceptionTransla

Mybatis中传参包There is no getter for property named &#39;XXX&#39; in &#39;class java.lang.String&#39;

一.发现问题 <select id="queryStudentByNum" resultType="student" parameterType="string"> select num,name,phone from student <where> <if test = " num!=null and num!='' "> AND num = #{num} </if> <

mybatis There is no getter for property named &#39;xx&#39; in &#39;class java.lang.String

用mybatis查询时,传入一个字符串传参数,且进行判断时,会报 There is no getter for property named 'moduleCode' in 'class java.lang.String 错误写法: <select id="queryAllParentModule" resultType="jobModule" parameterType="jobModule"> select modulecode,

Mybatis中传参包There is no getter for property named &#39;roomName&#39; in &#39;class java.lang.String&#39;

一.发现问题 <select id="queryStudentByNum" resultType="student" parameterType="string"> select num,name,phone from student  <where> <if test = " num!=null and num!='' ">AND num = #{num}</if></w

(mybatis)There is no getter for property named &#39;isEffective&#39; in &#39;class java.lang.String

原来代码: <select id="findSpecialOffer" resultType="com.lizard.back.model.SpecialOffer" parameterType="java.lang.String"> SELECT taso.id, taso.product_id as productId , taso.table_name as tableName, taso.start_time_special_