1 2@Update("update blog.user set mail=#{mail} where userId=#{userId}") void updateEncrypt(String mail, Long userId);org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter ‘mail’ not found. Available parameters are [arg1, arg0, param1, param2]。
MyBatis 没有找到
MyBatis 默认的行为是通过位置来传递参数 (例如 arg0, arg1)。如果使用了具名参数(如 mail 和 userId),需要确保方法参数名与注解中的名称一致。有如下两种解决方法:
|
|
|
|