SSM中mybatis报错Parameter 'user_name' not found. Available parameters are [0, 1, param1, param2]]……
后台控制器报错
: Servlet.service() for servlet [Springmvc] in context with path [/yiyangzhongxin] threw exception [Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter 'user_name' not found. Available parameters are [0, 1, param1, param2]] with root cause
org.apache.ibatis.binding.BindingException: Parameter 'user_name' not found. Available parameters are [0, 1, param1, param2]
包以上的错误只需要在文件传值接收形参的时候加上@Param()注解就好了
public User rolemodule(@Param("moduleID") Integer moduleID,@Param("user_name")String user_name);
还没有评论,来说两句吧...