open class DateFormatterRegistrar : FormatterRegistrar
Configures basic date formatting for use with Spring, primarily for org.springframework.format.annotation.DateTimeFormat declarations. Applies to fields of type Date, Calendar and long.
Designed for direct instantiation but also exposes the static #addDateConverters(ConverterRegistry) utility method for ad-hoc use against any ConverterRegistry instance.
Author
Phillip Webb
Since
3.2
See Also
org.springframework.format.datetime.standard.DateTimeFormatterRegistrarorg.springframework.format.datetime.joda.JodaTimeFormatterRegistrarFormatterRegistrar#registerFormatters
DateFormatterRegistrar()
Configures basic date formatting for use with Spring, primarily for org.springframework.format.annotation.DateTimeFormat declarations. Applies to fields of type Date, Calendar and Designed for direct instantiation but also exposes the static |
open static fun addDateConverters(converterRegistry: ConverterRegistry): Unit
Add date converters to the specified registry. |
|
open fun registerFormatters(registry: FormatterRegistry): Unit |
|
open fun setFormatter(dateFormatter: DateFormatter): Unit
Set a global date formatter to register. If not specified, no general formatter for non-annotated Date and Calendar fields will be registered. |