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);
	
發佈了83 篇原創文章 · 獲贊 27 · 訪問量 4萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章