这里收集了常用的MySql字段类型与Mybatis中javaType和Java字段类型的对应关系
MySql字段类型 MyBatis的jdbcType类型 Java字段类型 ---------------------------------------------------------------------------------------------- BIGINT BIGINT Long BIGINT UNSIGNED BIGINT Long BIT BIT Integer BLOB LONGVARBINARY byte[] CHAR CHAR String DATE DATE Date DATETIME TIMESTAMP Date DECIMAL DECIMAL BigDecimal DECIMAL UNSIGNED DECIMAL BigDecimal DOUBLE DOUBLE Double DOUBLE UNSIGNED DOUBLE Double FLOAT FLOAT Float INT INTEGER Integer INT UNSIGNED INTEGER Integer JSON LONGVARCHAR S tring LONGBLOB LONGVARBINARY byte[] LONGTEXT LONGVARCHAR String TEXT LONGVARCHAR String TIME TIME Date TIMESTAMP TIMESTAMP Date TINYBLOB VARBINARY byte[] TINYINT TINYINT Byte TINYINT UNSIGNED TINYINT Byte TINYTEXT VARCHAR String VARCHAR VARCHAR String YEAR DATE Date