类 ConfigurationPropertiesBindingPostProcessor
- java.lang.Object
- org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor
- 所有已实现的接口:
EventListener
,org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanFactoryAware
,org.springframework.beans.factory.config.BeanPostProcessor
,org.springframework.beans.factory.DisposableBean
,org.springframework.beans.factory.InitializingBean
,org.springframework.context.ApplicationContextAware
,org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
,org.springframework.context.EnvironmentAware
,org.springframework.core.Ordered
,org.springframework.core.PriorityOrdered
public class ConfigurationPropertiesBindingPostProcessor extends Object implements org.springframework.beans.factory.config.BeanPostProcessor, org.springframework.beans.factory.BeanFactoryAware, org.springframework.context.EnvironmentAware, org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean, org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>, org.springframework.core.PriorityOrdered
字段概要
字段 修饰符和类型 字段 说明 static String
VALIDATOR_BEAN_NAME
The bean name of the configuration properties validator.
构造器概要
构造器 构造器 说明 ConfigurationPropertiesBindingPostProcessor()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
afterPropertiesSet()
void
destroy()
int
getOrder()
Return the order of the bean.void
onApplicationEvent(org.springframework.context.event.ContextRefreshedEvent event)
Object
postProcessAfterInitialization(Object bean, String beanName)
Object
postProcessBeforeInitialization(Object bean, String beanName)
void
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
void
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
void
setBeanMetaDataStore(ConfigurationBeanFactoryMetaData beans)
Set the bean meta-data store.void
setConversionService(org.springframework.core.convert.ConversionService conversionService)
Set the conversion service used to convert property values.void
setConverters(List<org.springframework.core.convert.converter.Converter<?,?>> converters)
A list of custom converters (in addition to the defaults) to use when converting properties for binding.void
setEnvironment(org.springframework.core.env.Environment environment)
void
setGenericConverters(List<org.springframework.core.convert.converter.GenericConverter> converters)
A list of custom converters (in addition to the defaults) to use when converting properties for binding.void
setOrder(int order)
Set the order of the bean.void
setPropertySources(org.springframework.core.env.PropertySources propertySources)
Set the property sources to bind.void
setValidator(org.springframework.validation.Validator validator)
Set the bean validator used to validate property fields.
字段详细资料
VALIDATOR_BEAN_NAME
public static final String VALIDATOR_BEAN_NAME
The bean name of the configuration properties validator.- 另请参阅:
- 常量字段值
构造器详细资料
ConfigurationPropertiesBindingPostProcessor
public ConfigurationPropertiesBindingPostProcessor()
方法详细资料
setConverters
@Autowired(required=false) @ConfigurationPropertiesBinding public void setConverters(List<org.springframework.core.convert.converter.Converter<?,?>> converters)
A list of custom converters (in addition to the defaults) to use when converting properties for binding.- 参数:
converters
- the converters to set
setGenericConverters
@Autowired(required=false) @ConfigurationPropertiesBinding public void setGenericConverters(List<org.springframework.core.convert.converter.GenericConverter> converters)
A list of custom converters (in addition to the defaults) to use when converting properties for binding.- 参数:
converters
- the converters to set
setOrder
public void setOrder(int order)
Set the order of the bean.- 参数:
order
- the order
getOrder
public int getOrder()
Return the order of the bean.- 指定者:
getOrder
在接口中org.springframework.core.Ordered
- 返回:
- the order
setPropertySources
public void setPropertySources(org.springframework.core.env.PropertySources propertySources)
Set the property sources to bind.- 参数:
propertySources
- the property sources
setValidator
public void setValidator(org.springframework.validation.Validator validator)
Set the bean validator used to validate property fields.- 参数:
validator
- the validator
setConversionService
public void setConversionService(org.springframework.core.convert.ConversionService conversionService)
Set the conversion service used to convert property values.- 参数:
conversionService
- the conversion service
setBeanMetaDataStore
public void setBeanMetaDataStore(ConfigurationBeanFactoryMetaData beans)
Set the bean meta-data store.- 参数:
beans
- the bean meta data store
setBeanFactory
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansException
- 指定者:
setBeanFactory
在接口中org.springframework.beans.factory.BeanFactoryAware
- 抛出:
org.springframework.beans.BeansException
setEnvironment
public void setEnvironment(org.springframework.core.env.Environment environment)
- 指定者:
setEnvironment
在接口中org.springframework.context.EnvironmentAware
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
- 指定者:
setApplicationContext
在接口中org.springframework.context.ApplicationContextAware
afterPropertiesSet
public void afterPropertiesSet() throws Exception
- 指定者:
afterPropertiesSet
在接口中org.springframework.beans.factory.InitializingBean
- 抛出:
Exception
onApplicationEvent
public void onApplicationEvent(org.springframework.context.event.ContextRefreshedEvent event)
- 指定者:
onApplicationEvent
在接口中org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
destroy
public void destroy() throws Exception
- 指定者:
destroy
在接口中org.springframework.beans.factory.DisposableBean
- 抛出:
Exception
postProcessBeforeInitialization
public Object postProcessBeforeInitialization(Object bean, String beanName) throws org.springframework.beans.BeansException
- 指定者:
postProcessBeforeInitialization
在接口中org.springframework.beans.factory.config.BeanPostProcessor
- 抛出:
org.springframework.beans.BeansException
postProcessAfterInitialization
public Object postProcessAfterInitialization(Object bean, String beanName) throws org.springframework.beans.BeansException
- 指定者:
postProcessAfterInitialization
在接口中org.springframework.beans.factory.config.BeanPostProcessor
- 抛出:
org.springframework.beans.BeansException