类 DateFormatterRegistrar

java.lang.Object
cn.taketoday.format.datetime.DateFormatterRegistrar
所有已实现的接口:
FormatterRegistrar

public class DateFormatterRegistrar extends Object implements FormatterRegistrar
Configures basic date formatting for use with Framework, primarily for 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.

从以下版本开始:
4.0
作者:
Phillip Webb
另请参阅:
  • 构造器详细资料

    • DateFormatterRegistrar

      public DateFormatterRegistrar()
  • 方法详细资料

    • setFormatter

      public void setFormatter(DateFormatter dateFormatter)
      Set a global date formatter to register.

      If not specified, no general formatter for non-annotated Date and Calendar fields will be registered.

    • registerFormatters

      public void registerFormatters(FormatterRegistry registry)
      从接口复制的说明: FormatterRegistrar
      Register Formatters and Converters with a FormattingConversionService through a FormatterRegistry SPI.
      指定者:
      registerFormatters 在接口中 FormatterRegistrar
      参数:
      registry - the FormatterRegistry instance to use.
    • addDateConverters

      public static void addDateConverters(cn.taketoday.core.conversion.ConverterRegistry converterRegistry)
      Add date converters to the specified registry.
      参数:
      converterRegistry - the registry of converters to add to