日期
java.sql.Date
java.time.LocalDate
org.joda.time.DateMidnight
org.joda.time.LocalDate
日期时间
java.sql.Timestamp
java.time.Instant
java.time.LocalDateTime
java.time.OffsetDateTime
java.time.ZonedDateTime
java.util.Date
java.util.Calendar
org.joda.time.DateTime
org.joda.time.LocalDateTime
时间
java.sql.Time
java.time.LocalTime
org.joda.time.LocalTime
org.joda.time.LocalTimeUTC
时间相关类型
类型 | 默认映射 |
---|---|
java.time.Year | INTEGER |
java.time.YearMonth | DATE(月日 = 1) |
java.time.MonthDay | DATE(年 = 2000) |
java.time.Duration | Decimal |
java.time.Period | Varchar(20) |
java.time.ZoneOffset | Varchar(60) |
java.time.OffsetTime | Varchar(25) |
java.time.ZoneId | Varchar(60) |
java.time.TimeZone | Varchar(20) |
org.joda.time.Period | Varchar(50) |