public class DateFormatterRegistrar extends Object implements FormatterRegistrar
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.
DateTimeFormatterRegistrar,
JodaTimeFormatterRegistrar,
FormatterRegistrar.registerFormatters(org.springframework.format.FormatterRegistry)| 构造器和说明 |
|---|
DateFormatterRegistrar() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
addDateConverters(org.springframework.core.convert.converter.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 a global date formatter to register.
|
public void setFormatter(DateFormatter dateFormatter)
public void registerFormatters(FormatterRegistry registry)
FormatterRegistrarregisterFormatters 在接口中 FormatterRegistrarregistry - the FormatterRegistry instance to use.public static void addDateConverters(org.springframework.core.convert.converter.ConverterRegistry converterRegistry)
converterRegistry - the registry of converters to add to