spring-framework/spring-context
Sam Brannen b2bcb0f93a Support multiple parsing patterns in @DateTimeFormat
Prior to this commit, @DateTimeFormat only supported a single format
for parsing date time values via the style, iso, and pattern attributes.

This commit introduces a new fallbackPatterns attribute that can be
used to configure multiple fallback patterns for parsing date time
values. This allows applications to accept multiple input formats for
date time values.

For example, if you wish to use the ISO date format for parsing and
printing but allow for lenient parsing of user input for various
additional date formats, you could annotate a field or method parameter
with configuration similar to the following.

    @DateTimeFormat(
        iso = ISO.DATE,
        fallbackPatterns = { "M/d/yy", "dd.MM.yyyy" }
    )

Closes gh-20292
2021-03-11 11:30:30 +01:00
..
src Support multiple parsing patterns in @DateTimeFormat 2021-03-11 11:30:30 +01:00
.springBeans Rename modules {org.springframework.*=>spring-*} 2012-01-31 14:37:10 +01:00
spring-context.gradle Upgrade to BeanShell 2.0b6 2020-04-07 18:06:43 +02:00