其他分享
首页 > 其他分享> > mybatis查询参数报jdbcType属性为空

mybatis查询参数报jdbcType属性为空

作者:互联网

查询报异常:

nested exception is org.apache.ibatis.exceptions.PersistenceException: \n### Error querying database. Cause: java.lang.IllegalStateException: Type handler was null on parameter mapping for property 'unitFitmentList'. It was either not specified and/or could not be found for the javaType (java.util.List) : jdbcType (null) combination.\n### Cause: java.lang.IllegalStateException: Type handler was null on parameter mapping for property 'unitFitmentList'. It was either not specified and/or could not be found for the javaType (java.util.List) : jdbcType (null) combination.

解决:

在dao层给参数加上@Param,正常查询

 

原因:

具体原因不清楚,估计是未加@Param,会有参数类型丢失的风险

标签:java,Param,查询,为空,jdbcType,mybatis,null,was
来源: https://www.cnblogs.com/kokaketu/p/16497853.html