想通过${}的方式直接替换字符,而不是通过#{}的方式预编译
于是配置
<select id="xxx" resultMap="BaseResultMap" statementType="STATEMENT">
select
<include refid="Base_Column_List" />
from table
where condition in ( ${param} )
</select>
大致原因应该是:
exception trace里面也有invoke、反射的字眼,应该是反射什么的异常。
Mybatis默认采用ONGL解析参数,所以会自动采用对象树的形式取string.param值,引起报错。
解决
public List methodName(@Param(value="num") String num)的方法说明参数值
参考:
http://blog.sina.com.cn/s/blog_67aaf44401019l87.html