public class AlloyConversionService
extends org.springframework.boot.autoconfigure.web.format.WebConversionService
在 ConfigurableWebBindingInitializer.setConversionService 中,建议将 ConversionService 交给 AlloyConversionService 处理
AlloyConversionService 的初始化代码 参考,
EnhanceAlloyConversionServiceProcess| 构造器和说明 |
|---|
AlloyConversionService(org.springframework.boot.autoconfigure.web.format.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.
|
| 限定符和类型 | 方法和说明 |
|---|---|
org.springframework.core.convert.converter.GenericConverter |
getConverter(org.springframework.core.convert.TypeDescriptor sourceType,
org.springframework.core.convert.TypeDescriptor targetType) |
addFormatter, addFormatterForFieldAnnotation, addFormatterForFieldType, addFormatterForFieldType, addParser, addPrinter, setEmbeddedValueResolveraddConverter, addConverter, addConverter, addConverterFactory, canBypassConvert, canConvert, canConvert, convert, convert, convert, convertNullSource, getDefaultConverter, removeConvertible, toStringpublic AlloyConversionService(org.springframework.boot.autoconfigure.web.format.DateTimeFormatters dateTimeFormatters)
dateTimeFormatters - the formatters to use for date, time, and date-time
formatting@Nullable
public org.springframework.core.convert.converter.GenericConverter getConverter(org.springframework.core.convert.TypeDescriptor sourceType,
org.springframework.core.convert.TypeDescriptor targetType)
getConverter 在类中 org.springframework.core.convert.support.GenericConversionServiceCopyright © 2024. All rights reserved.