org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.type.TypeException:

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property='userId', mode=IN, javaType=class java.lang.Long, jdbcType=null, numericScale=null, resultMapId='null', jdbcTypeName='null', expression='null'}. Cause: org.apache.ibatis.type.TypeException: Error setting non null for parameter #2 with JdbcType null . Try setting a different JdbcType for this parameter or a different configuration property. Cause: java.sql.SQLException: Parameter index out of range (2 > number of parameters, which is 1).
    at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:92) 

 搞了这么多:

        原来是xml里由注解

解决方法:

        删除注解 


版权声明:本文为weixin_51299408原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。