|
spring-context | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.context.support.ConversionServiceFactoryBean
public class 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
@Configuration
classes, simply instantiate, configure and return the appropriate
ConversionService object from a @Bean method.
| Constructor Summary | |
|---|---|
ConversionServiceFactoryBean()
|
|
| Method Summary | |
|---|---|
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()
|
java.lang.Class<? extends org.springframework.core.convert.ConversionService> |
getObjectType()
|
boolean |
isSingleton()
|
void |
setConverters(java.util.Set<?> converters)
Configure the set of custom converter objects that should be added: implementing Converter,
ConverterFactory,
or GenericConverter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConversionServiceFactoryBean()
| Method Detail |
|---|
public void setConverters(java.util.Set<?> converters)
Converter,
ConverterFactory,
or GenericConverter.
public void afterPropertiesSet()
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanprotected org.springframework.core.convert.support.GenericConversionService createConversionService()
Creates a simple GenericConversionService instance by default.
Subclasses may override to customize the ConversionService instance that
gets created.
public org.springframework.core.convert.ConversionService getObject()
getObject in interface org.springframework.beans.factory.FactoryBean<org.springframework.core.convert.ConversionService>public java.lang.Class<? extends org.springframework.core.convert.ConversionService> getObjectType()
getObjectType in interface org.springframework.beans.factory.FactoryBean<org.springframework.core.convert.ConversionService>public boolean isSingleton()
isSingleton in interface org.springframework.beans.factory.FactoryBean<org.springframework.core.convert.ConversionService>
|
spring-context | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||