Parameter 'list' not found. Available parameters are [collection] - 已解决

Caused by: org.apache.ibatis.binding.BindingException: Parameter 'list' not found. Available parameters are [collection]

问题

Mapper.java

public List load(Collection<String> list);

Mapper.xml

SELECT * FROM
	table_1 
WHERE 
	id in
<foreach close=")" collection="list" item="i" open="(" separator=",">
	#{i}
</foreach>

修复

public List load(@Param("list") Collection<String> list);

说明:foreach未使用@param注解指定参数时,默认类型推断为java.util.List。