最近java spring和Mybatis开发时,报错: Parameter 'XXX' not found. Available parameters are [arg1, arg0, param1, param2]
原因:一般是由于Dao层的方法包含多个参数
@Update("update t_pa_developer set exclusive_open=#{state} where merch_id=#{devMerchId}")
boolean setExclusiveDeveloper(Integer devMerchId, Integer state);
上面的代码就会报错,解决方法是:在参数前加上@Param注解
@Update("update t_pa_developer set exclusive_open=#{state} where merch_id=#{devMerchId}")
boolean setExclusiveDeveloper(@Param("devMerchId") Integer devMerchId, @Param("state") Integer state);
另外一种方法是修改IDEA,这里就不说明了。

java常用注解校验不为空
java 使用Math 向上向下取
java Name for argument of type xxx not specified
java应用程序阿里云CPU过高Arthas如何排查
tomcat如何关闭catalina.out日志