Class WebConversionService

java.lang.Object
org.springframework.core.convert.support.GenericConversionService
org.springframework.format.support.FormattingConversionService
org.springframework.format.support.DefaultFormattingConversionService
org.springframework.boot.autoconfigure.web.format.WebConversionService
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.EmbeddedValueResolverAware, org.springframework.core.convert.ConversionService, org.springframework.core.convert.converter.ConverterRegistry, org.springframework.core.convert.support.ConfigurableConversionService, org.springframework.format.FormatterRegistry

public class WebConversionService extends org.springframework.format.support.DefaultFormattingConversionService
FormattingConversionService dedicated to web applications for formatting and converting values to/from the web.

This service replaces the default implementations provided by @EnableWebMvc and @EnableWebFlux.

Since:
2.0.0
  • Constructor Summary

    Constructors
    Constructor
    Description
    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.
  • Method Summary

    Methods inherited from class org.springframework.format.support.DefaultFormattingConversionService

    addDefaultFormatters

    Methods inherited from class org.springframework.format.support.FormattingConversionService

    addFormatter, addFormatterForFieldAnnotation, addFormatterForFieldType, addFormatterForFieldType, addParser, addPrinter, setEmbeddedValueResolver

    Methods inherited from class org.springframework.core.convert.support.GenericConversionService

    addConverter, addConverter, addConverter, addConverterFactory, canBypassConvert, canConvert, canConvert, convert, convert, convert, convertNullSource, getConverter, getDefaultConverter, removeConvertible, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.springframework.core.convert.converter.ConverterRegistry

    addConverter, addConverter, addConverter, addConverterFactory, removeConvertible
  • 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