Class WebConversionService

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

public class WebConversionService extends DefaultFormattingConversionService
FormattingConversionService dedicated to web applications for formatting and converting values to/from the web.
Since:
2.0.0
Author:
Brian Clozel
  • Constructor Details

    • WebConversionService

      public WebConversionService(DateTimeFormatters dateTimeFormatters)
      Create a new WebConversionService that configures formatters with the provided date, time, and date-time formats, or registers the default if no custom format is provided.
      Parameters:
      dateTimeFormatters - the formatters to use for date, time, and date-time formatting
      Since:
      2.3.0
    • WebConversionService

      public WebConversionService(@Nullable StringValueResolver embeddedValueResolver, DateTimeFormatters dateTimeFormatters)
      Create a new WebConversionService that configures formatters with the provided date, time, and date-time formats, or registers the default if no custom format is provided. The given embeddedValueResolver is used to resolve embedded values such as property placeholders in DateTimeFormat.pattern() patterns.
      Parameters:
      embeddedValueResolver - the embedded value resolver to use, or null
      dateTimeFormatters - the formatters to use for date, time, and date-time formatting
      Since:
      4.1.0