spring properties 关键属性注入类继承关系是下面的关系:
PropertyPlaceholderConfigurer(
PlaceholderConfigurerSupport
(PropertyResourceConfigurer
(PropertiesLoaderSupport
BeanFactoryPostProcessor
PriorityOrdered)
BeanNameAware)
BeanFactoryAware)
根据上面的关系,看到继承的是BeanFactoryPostProcessor,由此可知,属性并非注入,而是在对rootbeandefined 解析阶段完成填充的方式,这时候还没有向外暴露bean;
PropertyPlaceholderConfigurer(
PlaceholderConfigurerSupport
(PropertyResourceConfigurer
(PropertiesLoaderSupport
BeanFactoryPostProcessor
PriorityOrdered)
BeanNameAware)
BeanFactoryAware)
根据上面的关系,看到继承的是BeanFactoryPostProcessor,由此可知,属性并非注入,而是在对rootbeandefined 解析阶段完成填充的方式,这时候还没有向外暴露bean;