1.org.apache.ibatis.binding.BindingException: Parameter ‘dateBefore’ not found. Available parameters are [arg1, arg0, param1, param2]
解决:mapper接口中参数加@Param注解(多个参数时)
int selectAllCount(@Param("dateBefore")Date dateBefore,@Param("dateAfter")Date dateAfter);
2. mybatis中使用LIKE
SELECT
*
FROM
user
WHERE
name LIKE '%'||#{name}||'%'