Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

es使用java.util.Date时转换报错 #432

Open
jzcccc opened this issue Nov 4, 2020 · 0 comments
Open

es使用java.util.Date时转换报错 #432

jzcccc opened this issue Nov 4, 2020 · 0 comments

Comments

@jzcccc
Copy link

jzcccc commented Nov 4, 2020

报错内容: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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant