类 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
  • 构造器详细资料

    • ConversionServiceFactoryBean

      public ConversionServiceFactoryBean()
  • 方法详细资料

    • setConverters

      public void setConverters(Set<?> converters)
      Configure the set of custom converter objects that should be added: implementing Converter, ConverterFactory, or GenericConverter.
    • 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 GenericConversionService instance 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

      public Class<? extends cn.taketoday.core.conversion.ConversionService> getObjectType()
      指定者:
      getObjectType 在接口中 FactoryBean<cn.taketoday.core.conversion.ConversionService>
    • isSingleton

      public boolean isSingleton()
      指定者:
      isSingleton 在接口中 FactoryBean<cn.taketoday.core.conversion.ConversionService>