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'》

 

点赞

Leave a Reply

Your email address will not be published. Required fields are marked *