Support flexible multi-unit duration format in @DurationFormat #33262
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
#30396 recently introduced support for multiple style of parsing/printing Durations, including the new SIMPLE format (
"30m"
,"2h"
,"530ms"
) inspired by Spring Boot.As discussed in multiple issues (including here), we could also support a multiple-components format such as
"1h 30m 13s"
quite similar to one of the formats supported by Kotlin. Right now, Spring doesn't support this and instead requires developers to use the"PT1H30M13S"
format.The text was updated successfully, but these errors were encountered: