SSM中mybatis报错Parameter 'user_name' not found. Available parameters are [0, 1, param1, param2]]……

妖狐艹你老母 2023-07-05 14:49 91阅读 0赞

后台控制器报错

  1. : 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
  2. org.apache.ibatis.binding.BindingException: Parameter 'user_name' not found. Available parameters are [0, 1, param1, param2]

包以上的错误只需要在文件传值接收形参的时候加上@Param()注解就好了

  1. public User rolemodule(@Param("moduleID") Integer moduleID,@Param("user_name")String user_name);

发表评论

表情:
评论列表 (有 0 条评论,91人围观)

还没有评论,来说两句吧...

相关阅读