Fork me on GitHub

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'

解决方法

接口改为

 

posted @ 2018-06-28 11:57  秋夜雨巷  阅读(217)  评论(0编辑  收藏  举报