mapper.xml在传递多个参数时,可以使用map传递,同样也可以使用注解去传递值。
int updateUserName(@Param(value = "username") String name, @Param(value ="id") int id);
本人在使用注解后发生标题错误,重启多次都没解决。
最后原因发现是: @Param注解导入出错
正确的注解为:
import org.apache.ibatis.annotations.Param;
还是太年轻,太大意