message Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: ne

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter 'email' not found. Available parameters are [1, 0, param1, param2]
    at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:73)
    at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:364)
    at com.sun.proxy.$Proxy15.selectList(Unknown Source)
    at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:194)
    at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:114)
    at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:58)
    at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:43)
    at com.sun.proxy.$Proxy17.getSCBycouAndcla(Unknown Source)
    at cn.springmvc.serviceiml.SortCourseServiceIml.addSCs(Unknown Source)
    at cn.springmvc.controller.SortCourseController.leadinSCs(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at 

解决办法:

第一种:在Mapper文件 中添加@Param

 User selectUserByEmailAndPassword(@Param("email")String email,@Param("password")String password)

这样问题就可以解决。

你可能感兴趣的:(message Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: ne)