spring-cloud / spring-cloud-openfeign

Support for using OpenFeign in Spring Cloud apps
Apache License 2.0
1.2k stars 779 forks source link

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

Closed Wuaner closed 7 months ago

Wuaner commented 8 months ago

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?

Wuaner commented 7 months ago

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