-
Notifications
You must be signed in to change notification settings - Fork 40.9k
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
Document the types to which each spring.mvc.format and spring.webflux.format property applies #41482
Comments
spring.mvc.format
Lines 93 to 101 in c693b2b
In the registerJavaDate method, the converter configuration only reads the spring.mvc.format.date setting, causing it to convert only the date portion and ignore the time portion when converting time strings. |
Lines 46 to 78 in c693b2b
Remove |
It seems the |
Thanks for the report, @relufi. I think the crux of the problem is that Unfortunately, we may have users that are relying upon the current behavior and, as far as I can tell, changing it in a backwards compatible way is not straightforward. For example, if someone has set I'll discuss this with the team, but in the meantime I would use |
We discussed this today and concluded that the best we can do is to document to which types each property applies in its description. The |
config:
code:
request: url param updateTime: 2024-07-18 02:00:10
Current Output:
Expected Output:
With the same configuration, using the LocalDateTime class to receive parameters results in successful conversion.
I took a quick look at the code, and it seems that the String to Date converter only utilizes the spring.mvc.format.date configuration and ignores the spring.mvc.format.time and spring.mvc.format.date-time configurations.
The text was updated successfully, but these errors were encountered: