public class DateFormatterRegistrar extends Object implements FormatterRegistrar
Designed for direct instantiation but also exposes the static
addDateConverters(ConverterRegistry)
utility method for ad hoc use
against any ConverterRegistry
instance.
JodaTimeFormatterRegistrar
,
FormatterRegistrar.registerFormatters(org.springframework.format.FormatterRegistry)
Constructor and Description |
---|
DateFormatterRegistrar() |
Modifier and Type | Method and Description |
---|---|
static void |
addDateConverters(ConverterRegistry converterRegistry)
Add date converters to the specified registry.
|
void |
registerFormatters(FormatterRegistry registry)
Register Formatters and Converters with a FormattingConversionService
through a FormatterRegistry SPI.
|
void |
setFormatter(DateFormatter dateFormatter)
Set the date formatter to register.
|
public void setFormatter(DateFormatter dateFormatter)
dateFormatter
- the date formatterpublic void registerFormatters(FormatterRegistry registry)
FormatterRegistrar
registerFormatters
in interface FormatterRegistrar
registry
- the FormatterRegistry instance to use.public static void addDateConverters(ConverterRegistry converterRegistry)
converterRegistry
- the registry of converters to add to