Class DateFormatterRegistrar

  • java.lang.Object
    • org.springframework.format.datetime.DateFormatterRegistrar
    • Constructor Detail

      • DateFormatterRegistrar

        public DateFormatterRegistrar()
    • Method Detail

      • 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)
        Description copied from interface: FormatterRegistrar
        Register Formatters and Converters with a FormattingConversionService through a FormatterRegistry SPI.
        Specified by:
        registerFormatters in interface FormatterRegistrar
        registry - the FormatterRegistry instance to use.
      • addDateConverters

        public static void addDateConverters(ConverterRegistry converterRegistry)
        Add date converters to the specified registry.
        converterRegistry - the registry of converters to add to