-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Default databinding for java 8 LocalDate #5523
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
Comments
|
What are the pros/cons of using |
+1, its painful to spam |
This should also work by default in POJOs for GET request. It does work for POST. |
Vote up for this enhancement. Actually I feel somewhat surprised that there is no global configuration to change the default |
I only tried the |
….LocalDate. Initial attempt and basis for discussions on how to fix spring-projectsgh-5523.
I found a way to make it work even with
I tried to generalize this using the |
….LocalDate. Initial attempt and basis for discussions on how to fix spring-projectsgh-5523.
I've blogged about this: https://blog.codecentric.de/en/2017/08/parsing-of-localdate-query-parameters-in-spring-boot/ |
I just tried to use this new feature with Spring Boot 2.0.1 and ran into parsing problems that I described in this Stack Overflow answer. Is this intended behaviour, have I been doing something wrong? My expectation was that |
@jo-ka I think you've identified a bug. Can you please open a new issue? I believe the key difference is the use of |
@wilkinsona Okay, I'll open a new issue , but only after @bclozel confirmed this, right? |
Please open a new one now. If we have to close it because @bclozel disagrees with my analysis then that's better than it getting forgotten because it's only being tracked by this already-closed issue. |
Given an endpoint with a LocalDate parameter :
I must set
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE)
everywhere I want to bind aLocalDate
. This code is boilerplate so I defined a custom editor :But it would be great if spring boot was able to do this natively with a date format in the properties file, and ISO as default.
The text was updated successfully, but these errors were encountered: