spring-cloud/spring-cloud-openfeign

SpringQueryMap doesn't serialize java.util.Date correctly while it present as object field

Wuaner opened this issue · 1 comments

Wuaner commented

Describe the bug
Version: Spring openfeign 3.1.5.
While using SpringQueryMap annotatted GET method to retrive paginated data, The java.util.Date field not correctly formatted.

Expected GET send by Feign Client:
https://{ip:port}/orders?pageNum=1&pageSize=10&payTime=2024-02-02

Actually:
https://{ip:port}/orders?pageNum=1&pageSize=10&payTime=Fri Feb 02 00:00:00 CST 2024

I tried the methods describe here but still not work. Is there any differences between @RequestParam and @SpringQueryMap while used on Feign-enabled method?

I found the solution here. It works like a charm.