nested exception is org.apache.ibatis.builder.BuilderException: Error invoking SqlProvider method (com.xxxx.xxxx). Cause: org.apache.ibatis.binding.BindingException: Parameter ‘arg0’ not found. Available parameters are [ids, param1]
mybatis报‘arg0’这个错误时有两种情况
第一种:mybatis中传入多个参数时,没有使用@param注解
@Select({"select ", insert_fields, " from ", table_name, " where from_id=#{userId} limit #{limit}"})
List<User> getList(@Param("userId") int userId,@Param("limit") int limit);
第二种:使用SelectProvider时,与上面一种混淆,使用了@Param注解
@SelectProvider(type = SQLProvider.class, method = "select")
List<User> select( int maxId, int count);
原文链接:https://blog.csdn.net/shaxixide/article/details/105148168