简单高效解决org.apache.ibatis.binding.BindingException: Parameter 'XXXX' not found.的问题办法

第一种情况:在mapper中当方法只有多个个参数时,需要加上@Param 例

Boolean updatebyfworkid(@Param("fstatus") Integer fstatus,@Param("fattachment") Integer fattachment)

第二种情况:如果你用的是mybatisplus的话,mapper层的方法名不能和mybatisplus的接口名一样 例

Boolean update(@Param("fstatus") Integer fstatus,@Param("fattachment") Integer fattachment)会出现错误 因为mybatisplus也有update这个接口方法
Boolean updatebyfworkid(@Param("fstatus") Integer fstatus,@Param("fattachment") Integer fattachment)

扩展:mybatisplus自带的方法,参考mybatisplus官网

 https://baomidou.com/pages/49cc81/

右侧的Service CRUD 接口,Mapper CRUD 接口

posted @ 2022-09-06 17:20  Yellow98  阅读(849)  评论(0)    收藏  举报