Class DefaultFormattingConversionService

All Implemented Interfaces:
Aware, EmbeddedValueResolverAware, ConversionService, ConverterRegistry, ConfigurableConversionService, FormatterRegistry

public class DefaultFormattingConversionService extends FormattingConversionService
A specialization of FormattingConversionService configured by default with converters and formatters appropriate for most applications.

Designed for direct instantiation but also exposes the static addDefaultFormatters(org.springframework.format.FormatterRegistry) utility method for ad hoc use against any FormatterRegistry instance, just as DefaultConversionService exposes its own addDefaultConverters method.

Automatically registers formatters for JSR-354 Money & Currency, JSR-310 Date-Time and/or Joda-Time 2.x, depending on the presence of the corresponding API on the classpath.

Chris Beams, Juergen Hoeller
  • Constructor Details

  • Method Details

    • addDefaultFormatters

      public static void addDefaultFormatters(FormatterRegistry formatterRegistry)
      Add formatters appropriate for most environments: including number formatters, JSR-354 Money & Currency formatters, JSR-310 Date-Time and/or Joda-Time formatters, depending on the presence of the corresponding API on the classpath.
      formatterRegistry - the service to register default formatters with