HTTP Status 500 - Request processing failed解决

使用SSM搭建系统,浏览器出现如下错误:

HTTP Status 500 - Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException:
 nested exception is org.apache.ibatis.binding.
BindingException: Parameter 'state' not found. 
Available parameters are [0, 1, param1, param2]

 原来是因为我的service层写了@Pram()注解,因为想到mybatis原生不支持多值传递,所以想到写了一个注解:

原来的:

service:

public void M(@Param("A")String A, @Param("B")int B) {
        Mapper.M(A,B);

}

改后:

mapper层:

public void M(@Param("A")String A, @Param("B")int B);

@Pram()原本就是用在dao层的,因为就算在service层进行传值,传的也是形参,在dao层压根不起作用,所以才会报错找不到那个参数“state”

以后@Pram()得注意了,共勉