Mybatis PostgreSQL查询带时区字段报错
PSQLException: Cannot convert the column of type TIMESTAMPTZ to requested type timestamp
解决
在SQL里去掉时间
select now()::timestamp(0)without time zone
使用OffsetDateTime
因为带时区的类型PGSQL返回的类型是OffsetDateTime
自己写TypeHandler做转换
把OffsetDateTime转成LocalDateTime