报错:
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 'username' not found. Available parameters are [arg1, arg0, param1, param2]
问题代码:
@Select("select adminId,adminName,sex,tel,email,cardId,role from admin where adminId = #{username} and pwd = #{password}") public Admin adminLogin(Integer username, String password); 解决办法: @Select("select adminId,adminName,sex,tel,email,cardId,role from admin where adminId = #{username} and pwd = #{password}") public Admin adminLogin(@Param("username")Integer username,@Param("password") String password);