MyBatis Parameter '*' not found


Servlet[springmvc]的Servlet.service()引发了具有根本原因的异常Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException:
nested exception is org.apache.ibatis.binding.BindingException: Parameter 'userCode' not found. Available parameters are [user, param1]
org.apache.ibatis.binding.BindingException: Parameter 'userCode' not found. Available parameters are [user, param1]

以上是错误信息

解决方案

我这边在dao层的接口那个使用了@Param()注解,要注意@Param()只使用在 基本类型的参数或者Srtring类型