Skip to content

@DateTimeFormat is override when I set spring.mvc.date-format #23890

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

Closed
lutongzero opened this issue Oct 30, 2019 · 4 comments
Closed

@DateTimeFormat is override when I set spring.mvc.date-format #23890

lutongzero opened this issue Oct 30, 2019 · 4 comments
Assignees
Labels
status: superseded An issue that has been superseded by another

Comments

@lutongzero
Copy link

example:
@GetMapping public void DateFormateTest(@DateTimeFormat(pattern = "yyyyMMdd")Date date) { }

In application.properties:
spring.mvc.date-format=yyyyMMddHH

I must set the parameter date fotmat is yyyyMMddHH.Is it reasonable?

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Oct 30, 2019
@bclozel
Copy link
Member

bclozel commented Oct 30, 2019

I’m not sure I understand the issue. Could you provide a small application sample that demonstrate the problem?
What result were you expecting, what did you get instead?

@bclozel bclozel added the status: waiting-for-feedback We need additional information before we can continue label Oct 30, 2019
@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Oct 30, 2019
@lutongzero
Copy link
Author

I’m not sure I understand the issue. Could you provide a small application sample that demonstrate the problem?
What result were you expecting, what did you get instead?

https://stackoverflow.com/questions/58577356/anything-annotate-on-class-field-that-can-override-global-date-format-for-model

@bclozel
Copy link
Member

bclozel commented Oct 30, 2019

@LuTongT this is not really helping, as this question mentions @ModelAttribute and this issue is not using it. Could you create a small sample application I could take a look at?

@bclozel bclozel added status: waiting-for-feedback We need additional information before we can continue and removed status: feedback-provided Feedback has been provided labels Oct 30, 2019
@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Oct 30, 2019
@bclozel bclozel self-assigned this Oct 30, 2019
@bclozel
Copy link
Member

bclozel commented Oct 30, 2019

@LuTongT I'm closing this issue in favor of #23893 and #23896
Thanks for your report!

@bclozel bclozel closed this as completed Oct 30, 2019
@bclozel bclozel added status: superseded An issue that has been superseded by another and removed status: feedback-provided Feedback has been provided status: waiting-for-triage An issue we've not yet triaged or decided on labels Oct 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: superseded An issue that has been superseded by another
Projects
None yet
Development

No branches or pull requests

3 participants