No enum constant org.apache.ibatis.type.JdbcType.Integer

No enum constant org.apache.ibatis.type.JdbcType.Integer,第1张

No enum constant org.apache.ibatis.type.JdbcType.Integer 一、前言

今天使用mybatis插入数据,报了如下的错误:

No enum constant org.apache.ibatis.type.JdbcType.Integer

出错代码在Mybatis的参数类型中:

#{item.tagGroupId,jdbcType=Integer},
#{item.sampleSetId,jdbcType=Integer}

看下报错就知道,没有枚举常量 JdbcType.Integer,也就是说JdbcType的枚举中没有这个Integer的东西,是我自己写错了,经查看官网,枚举值全部都是大写的,如下图:

官网地址:
https://mybatis.org/mybatis-3/apidocs/reference/org/apache/ibatis/type/JdbcType.html

二、解决方式

将#{XXX,jdbcType=Integer}改成#{XXX,jdbcType=INTEGER}

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/5597110.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-15
下一篇 2022-12-15

发表评论

登录后才能评论

评论列表(0条)

保存