|
22 | 22 | import java.lang.reflect.Type;
|
23 | 23 | import java.math.BigDecimal;
|
24 | 24 | import java.math.BigInteger;
|
| 25 | +import java.time.Instant; |
| 26 | +import java.time.LocalDate; |
| 27 | +import java.time.LocalDateTime; |
| 28 | +import java.time.LocalTime; |
| 29 | +import java.time.Month; |
| 30 | +import java.time.OffsetDateTime; |
| 31 | +import java.time.OffsetTime; |
| 32 | +import java.time.Year; |
| 33 | +import java.time.YearMonth; |
| 34 | +import java.time.ZonedDateTime; |
| 35 | +import java.time.chrono.JapaneseDate; |
25 | 36 | import java.util.Collection;
|
26 | 37 | import java.util.Collections;
|
27 | 38 | import java.util.Date;
|
@@ -136,7 +147,17 @@ public TypeHandlerRegistry() {
|
136 | 147 |
|
137 | 148 | // mybatis-typehandlers-jsr310
|
138 | 149 | if (Jdk.dateAndTimeApiExists) {
|
139 |
| - Java8TypeHandlersRegistrar.registerDateAndTimeHandlers(this); |
| 150 | + this.register(Instant.class, InstantTypeHandler.class); |
| 151 | + this.register(LocalDateTime.class, LocalDateTimeTypeHandler.class); |
| 152 | + this.register(LocalDate.class, LocalDateTypeHandler.class); |
| 153 | + this.register(LocalTime.class, LocalTimeTypeHandler.class); |
| 154 | + this.register(OffsetDateTime.class, OffsetDateTimeTypeHandler.class); |
| 155 | + this.register(OffsetTime.class, OffsetTimeTypeHandler.class); |
| 156 | + this.register(ZonedDateTime.class, ZonedDateTimeTypeHandler.class); |
| 157 | + this.register(Month.class, MonthTypeHandler.class); |
| 158 | + this.register(Year.class, YearTypeHandler.class); |
| 159 | + this.register(YearMonth.class, YearMonthTypeHandler.class); |
| 160 | + this.register(JapaneseDate.class, JapaneseDateTypeHandler.class); |
140 | 161 | }
|
141 | 162 |
|
142 | 163 | // issue #273
|
|
0 commit comments