mall
mall copied to clipboard
es使用java.util.Date时转换报错
报错内容:java.time.temporal.UnsupportedTemporalTypeException: Unsupported field: InstantSeconds
使用注解: @Field( type = FieldType.Date, format = DateFormat.custom, pattern = "yyyy-MM-dd HH:mm:ss" ) @JsonFormat(shape = JsonFormat.Shape.STRING, pattern ="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
看了下堆栈信息,org.springframework.data.elasticsearch.core.convert.ElasticsearchDateConverter.parse()在处理格式转换时出去,查了下,有博主提了相关的问题,并且在spring data elasticsearch 提了issues,在spring boot 2.3.5.RELEASE得到解决,以下是提交记录。是否有其他解决方式?或者将boot版本升级?
https://jira.spring.io/browse/DATAES-953