public class WebConversionService extends 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
.
Constructor and Description |
---|
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.
|
WebConversionService(String dateFormat)
Deprecated.
since 2.3.0 in favor of
WebConversionService(DateTimeFormatters) |
addDefaultFormatters
addFormatter, addFormatterForFieldAnnotation, addFormatterForFieldType, addFormatterForFieldType, addParser, addPrinter, setEmbeddedValueResolver
addConverter, addConverter, addConverter, addConverterFactory, canBypassConvert, canConvert, canConvert, convert, convert, convert, convertNullSource, getConverter, getDefaultConverter, removeConvertible, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addConverter, addConverter, addConverter, addConverterFactory, removeConvertible
@Deprecated public WebConversionService(String dateFormat)
WebConversionService(DateTimeFormatters)
dateFormat
- the custom date format to use for date conversionspublic WebConversionService(DateTimeFormatters dateTimeFormatters)
dateTimeFormatters
- the formatters to use for date, time, and date-time
formatting