Skip to content
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

Reorder date formatting converter in registrar #23893

Merged
merged 1 commit into from
Oct 30, 2019

Commits on Oct 30, 2019

  1. Reorder date formatting converter in registrar

    Prior to this commit, the `DateFormatterRegistrar` would register the
    annotation-based formatter before the pattern-based formatter. This
    would create an issue when an application tries to convert a `String` to
    an annotated `@DateTimeFormat Date`: since the converters are considered
    in reversed order of registration in
    `GenericConversionServicei#ConvertersForPair`, the pattern-based variant
    would always be considered before the annotation-based variant,
    overriding the developer's opinion.
    
    This commit aligns the `DateFormatterRegistrar` with the
    `DateTimeFormatterRegistrar` and registers the annotation-based variant
    last.
    
    Closes spring-projectsgh-23893
    bclozel committed Oct 30, 2019
    Configuration menu
    Copy the full SHA
    4beb25b View commit details
    Browse the repository at this point in the history