org.springframework.context.support

## 类 ConversionServiceFactoryBean

- java.lang.Object
- - org.springframework.context.support.ConversionServiceFactoryBean

- 所有已实现的接口:
    org.springframework.beans.factory.FactoryBean<org.springframework.core.convert.ConversionService>, org.springframework.beans.factory.InitializingBean

      public class ConversionServiceFactoryBean
      extends Object
      implements org.springframework.beans.factory.FactoryBean<org.springframework.core.convert.ConversionService>, org.springframework.beans.factory.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.

  从以下版本开始:
    3.0
  作者:
    Keith Donald, Juergen Hoeller, Chris Beams

- - ### 构造器概要

    构造器
    构造器和说明
    `ConversionServiceFactoryBean()`

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `void` | `afterPropertiesSet()`
    `protected org.springframework.core.convert.support.GenericConversionService` | `createConversionService()` Create the ConversionService instance returned by this factory bean.
    `org.springframework.core.convert.ConversionService` | `getObject()`
    `Class<? extends org.springframework.core.convert.ConversionService>` | `getObjectType()`
    `boolean` | `isSingleton()`
    `void` | `setConverters(Set<?> converters)` Configure the set of custom converter objects that should be added: implementing `Converter`, `ConverterFactory`, or `GenericConverter`.

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 构造器详细资料

    - #### 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` 在接口中 `org.springframework.beans.factory.InitializingBean`

    - #### createConversionService

          protected org.springframework.core.convert.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 org.springframework.core.convert.ConversionService getObject()

      指定者:
        `getObject` 在接口中 `org.springframework.beans.factory.FactoryBean<org.springframework.core.convert.ConversionService>`

    - #### getObjectType

          public Class<? extends org.springframework.core.convert.ConversionService> getObjectType()

      指定者:
        `getObjectType` 在接口中 `org.springframework.beans.factory.FactoryBean<org.springframework.core.convert.ConversionService>`

    - #### isSingleton

          public boolean isSingleton()

      指定者:
        `isSingleton` 在接口中 `org.springframework.beans.factory.FactoryBean<org.springframework.core.convert.ConversionService>`