public class EnumConverterFactory extends Object implements org.springframework.core.convert.converter.ConverterFactory<String,Enum>, RecursiveConverter
To use the EnumConverterFactory in Spring 3.1+ with @Configuration annotations:
public class WebConfig extends WebMvcConfigurerAdapter
{
@Override
public void addFormatters( FormatterRegistry registry ) {
registry.addConverterFactory( new EnumConverterFactory() );
}
}
| Constructor and Description |
|---|
EnumConverterFactory() |
| Modifier and Type | Method and Description |
|---|---|
<E extends Enum> |
getConverter(Class<E> targetType)
Get a converter instance for the specified enum class.
|
void |
setConversionService(org.springframework.core.convert.ConversionService conversionService)
Set the conversionService.
|
public final void setConversionService(org.springframework.core.convert.ConversionService conversionService)
setConversionService in interface RecursiveConverterCopyright © 2017. All rights reserved.