类 ConversionServiceFactoryBean
java.lang.Object
cn.taketoday.context.support.ConversionServiceFactoryBean
- 所有已实现的接口:
FactoryBean<cn.taketoday.core.conversion.ConversionService>,InitializingBean
public class ConversionServiceFactoryBean
extends Object
implements FactoryBean<cn.taketoday.core.conversion.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
@Configuration
classes, simply instantiate, configure and return the appropriate
ConversionService object from a @Bean method.
- 从以下版本开始:
- 4.0 2022/3/13 10:53
- 作者:
- Keith Donald, Juergen Hoeller, Chris Beams, Harry Yang
-
字段概要
从接口继承的字段 cn.taketoday.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidprotected cn.taketoday.core.conversion.support.GenericConversionServiceCreate the ConversionService instance returned by this factory bean.cn.taketoday.core.conversion.ConversionServiceClass<? extends cn.taketoday.core.conversion.ConversionService>booleanvoidsetConverters(Set<?> converters) Configure the set of custom converter objects that should be added: implementingConverter,ConverterFactory, orGenericConverter.
-
构造器详细资料
-
ConversionServiceFactoryBean
public ConversionServiceFactoryBean()
-
-
方法详细资料
-
setConverters
Configure the set of custom converter objects that should be added: implementingConverter,ConverterFactory, orGenericConverter. -
afterPropertiesSet
public void afterPropertiesSet()- 指定者:
afterPropertiesSet在接口中InitializingBean
-
createConversionService
protected cn.taketoday.core.conversion.support.GenericConversionService createConversionService()Create the ConversionService instance returned by this factory bean.Creates a simple
GenericConversionServiceinstance by default. Subclasses may override to customize the ConversionService instance that gets created. -
getObject
@Nullable public cn.taketoday.core.conversion.ConversionService getObject()- 指定者:
getObject在接口中FactoryBean<cn.taketoday.core.conversion.ConversionService>
-
getObjectType
- 指定者:
getObjectType在接口中FactoryBean<cn.taketoday.core.conversion.ConversionService>
-
isSingleton
public boolean isSingleton()- 指定者:
isSingleton在接口中FactoryBean<cn.taketoday.core.conversion.ConversionService>
-