No enum constant org.apache.ibatis.type.JdbcType.long mybatis xml sql语句多种数据类型

Caused by: org.apache.ibatis.builder.BuilderException: Error resolving JdbcType. Cause: java.lang.IllegalArgumentException: No enum constant org.apache.ibatis.type.JdbcType.long
	at org.apache.ibatis.builder.BaseBuilder.resolveJdbcType(BaseBuilder.java:73)
	at org.apache.ibatis.builder.SqlSourceBuilder$ParameterMappingTokenHandler.buildParameterMapping(SqlSourceBuilder.java:101)
	at org.apache.ibatis.builder.SqlSourceBuilder$ParameterMappingTokenHandler.handleToken(SqlSourceBuilder.java:67)
	at org.apache.ibatis.parsing.GenericTokenParser.parse(GenericTokenParser.java:78)
	at org.apache.ibatis.builder.SqlSourceBuilder.parse(SqlSourceBuilder.java:45)
	at org.apache.ibatis.scripting.defaults.RawSqlSource.(RawSqlSource.java:46)
	at org.apache.ibatis.scripting.defaults.RawSqlSource.(RawSqlSource.java:40)
	at org.apache.ibatis.scripting.xmltags.XMLScriptBuilder.parseScriptNode(XMLScriptBuilder.java:72)
	at org.apache.ibatis.scripting.xmltags.XMLLanguageDriver.createSqlSource(XMLLanguageDriver.java:44)
	at org.apache.ibatis.builder.xml.XMLStatementBuilder.parseStatementNode(XMLStatementBuilder.java:94)
	at org.apache.ibatis.builder.xml.XMLMapperBuilder.buildStatementFromContext(XMLMapperBuilder.java:135)
	at org.apache.ibatis.builder.xml.XMLMapperBuilder.buildStatementFromContext(XMLMapperBuilder.java:128)
	at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement(XMLMapperBuilder.java:118)
	... 22 more
Caused by: java.lang.IllegalArgumentException: No enum constant org.apache.ibatis.type.JdbcType.long
	at java.lang.Enum.valueOf(Enum.java:238)
	at org.apache.ibatis.type.JdbcType.valueOf(JdbcType.java:25)
	at org.apache.ibatis.builder.BaseBuilder.resolveJdbcType(BaseBuilder.java:71)
	... 34 more

这个错误提示的意思是说,无法解析JdbcType.long

我们来看一下SQL语句:

说明在mybatis中根本无法解析long类型

具体的对应对应关系可查看

java和 mysqbtais:https://blog.csdn.net/hu_zhiting/article/details/87868310

mybtais和DB:https://blog.csdn.net/loongshawn/article/details/50496460

 此处long 和BIGINT 是对应

	

希望对你有所帮助

你可能感兴趣的:(No enum constant org.apache.ibatis.type.JdbcType.long mybatis xml sql语句多种数据类型)