spring-framework / org.springframework.context.support / ConversionServiceFactoryBean

ConversionServiceFactoryBean

open class ConversionServiceFactoryBean : FactoryBean<ConversionService>, InitializingBean

A factory providing convenient access to a ConversionService configured with converters appropriate for most environments. Set the "converters" property to supplement the default converters.

This implementation creates a DefaultConversionService. Subclasses may override #createConversionService() in order to return a GenericConversionService instance of their choosing.

Like all FactoryBean implementations, this class is suitable for use when configuring a Spring application context using Spring <beans> XML. When configuring the container with org.springframework.context.annotation.Configuration classes, simply instantiate, configure and return the appropriate ConversionService object from a method.

Author
Keith Donald

Author
Juergen Hoeller

Author
Chris Beams

Since
3.0

Constructors

<init>

ConversionServiceFactoryBean()

A factory providing convenient access to a ConversionService configured with converters appropriate for most environments. Set the "converters" property to supplement the default converters.

This implementation creates a DefaultConversionService. Subclasses may override #createConversionService() in order to return a GenericConversionService instance of their choosing.

Like all FactoryBean implementations, this class is suitable for use when configuring a Spring application context using Spring <beans> XML. When configuring the container with org.springframework.context.annotation.Configuration classes, simply instantiate, configure and return the appropriate ConversionService object from a method.

Functions

afterPropertiesSet

open fun afterPropertiesSet(): Unit

getObject

open fun getObject(): ConversionService

getObjectType

open fun getObjectType(): Class<out ConversionService>

isSingleton

open fun isSingleton(): Boolean

setConverters

open fun setConverters(converters: MutableSet<*>): Unit

Configure the set of custom converter objects that should be added: implementing org.springframework.core.convert.converter.Converter, org.springframework.core.convert.converter.ConverterFactory, or org.springframework.core.convert.converter.GenericConverter.