Exception encountered during context initialization - cancelling refresh attempt: org.springframewor

目录

 1、定位问题

2、问题解决

3、Mybatis JdbcType和Mysql数据类型对应关系:


 1、定位问题

解决错误时先找报错开始的最后一行,慢慢向上看,可确定报错文件位置,根据信息可知错误位置在MeanMapper.xml内

Exception encountered during context initialization - cancelling refresh attempt: org.springframewor_第1张图片

 同时接着向上看错误信息,可读出问题出在JdbcType

Exception encountered during context initialization - cancelling refresh attempt: org.springframewor_第2张图片

2、问题解决

后来知道数据库数据类型与mybatis有差异,有对应相应填法

Exception encountered during context initialization - cancelling refresh attempt: org.springframewor_第3张图片

修改后正常运行

Exception encountered during context initialization - cancelling refresh attempt: org.springframewor_第4张图片

 Exception encountered during context initialization - cancelling refresh attempt: org.springframewor_第5张图片

 

,附上对应数据类型填法

3、Mybatis JdbcType和Mysql数据类型对应关系:

Mybatis

JdbcType

MySql

JdbcType

ARRAY

JdbcType

BIGINT

BIGINT

JdbcType

BINARY

JdbcType

BIT

BIT

JdbcType

BLOB

BLOB

JdbcType

BOOLEAN

JdbcType

CHAR

CHAR

JdbcType

CLOB

CLOB–>修改为TEXT

JdbcType

CURSOR

JdbcType

DATE

DATE

JdbcType

DECIMAL

DECIMAL

JdbcType

DOUBLE

DOUBLE

JdbcType

FLOAT

FLOAT

JdbcType

INTEGER

INTEGER

JdbcType

LONGVARBINARY

JdbcType

LONGVARCHAR

JdbcType

NCHAR

JdbcType

NCLOB

JdbcType

NULL

JdbcType

NUMERIC

NUMERIC/

JdbcType

NVARCHAR

JdbcType

OTHER

JdbcType

REAL

REAL

JdbcType

SMALLINT

SMALLINT

JdbcType

STRUCT

JdbcType

TIME

TIME

JdbcType

TIMESTAMP

TIMESTAMP/DATETIME

JdbcType

TINYINT

TINYINT

JdbcType

UNDEFINED

JdbcType

VARBINARY

JdbcType

VARCHAR

VARCHAR

你可能感兴趣的:(java)