MyBatis Data Type | Java Data Type |
---|---|
VARCHAR or CHAR | java.lang.String |
INTEGER | int or java.lang.Integer |
BIGINT | long or java.lang.Long |
SMALLINT | short or java.lang.Short |
TINYINT | byte or java.lang.Byte |
DECIMAL | java.math.BigDecimal |
FLOAT | float or java.lang.Float |
DOUBLE | double or java.lang.Double |
BOOLEAN | boolean or java.lang.Boolean |
DATE | java.util.Date or java.time.LocalDate |
TIME | java.util.Date or java.time.LocalTime |
TIMESTAMP | java.util.Date or java.time.LocalDateTime |
BLOB | byte[] or java.sql.Blob |
CLOB | java.lang.String or java.sql.Clob |
Mybatis 与 Java 数据类型对应关系表
![](https://img-home.csdnimg.cn/images/20240711042549.png)