问题
1.ZonedDateTime无法保存,时间格式问题
2.获取结果,getObject抛出异常
threw exception [Handler dispatch failed; nested exception is java.lang.AbstractMethodError: Method oracle/jdbc/driver/OracleResultSetImpl.getObject(Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Object; is abstract]
以上都是当前数据库对于新类型ZonedDateTime,LocalDateTime的不支持造成的
解决方法
1.引入依赖,将时间先转换为Timestamp,然后再转为LocalDateTime或ZonedDateTime
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-typehandlers-jsr310</artifactId>
<version>1.0.2</version>
</dependency>
2.如果还没有解决,注意依赖引入的顺序