MyBatis There is no getter for property named 'xxx' in 'class java.lang.String'

来源:互联网 发布:最近网络同学聚会歌曲 编辑:程序博客网 时间:2024/05/17 13:06

1. Code

1.1 mapper xml

<select id="getItems" parameterType="string" resultMap="itemResult">...</select>
1.2 mapper interface
public interface OrderDao {public List<Item> getItems(String orderIds);}

2. Issue

There is no getter for property named 'orderIds' in 'class java.lang.String'

3. Solution

import org.apache.ibatis.annotations.Param;public interface OrderDao {public List<Item> getItems(@Param("orderIds") String orderIds);}


Reference

[1] http://stackoverflow.com/questions/19848861/mybatis-dynamic-sql-using-longs

0 0
原创粉丝点击