報錯日志
Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter 'first' not found. Available parameters are [0, 1, param1, param2]] with root cause
org.apache.ibatis.binding.BindingException: Parameter 'first' not found. Available parameters are [0, 1, param1, param2]
出錯的Mapper.java
List<WsMenu> twoParam(Integer first, Integer second);
解決辦法(指定參數别名):
List<WsMenu> twoParam(@Param("first") Integer first,@Param("second") Integer second);