首页 > 其他 > 详细

PropertyPlaceholderConfigurer

时间:2019-12-02 18:45:54      阅读:89      评论:0      收藏:0      [点我收藏+]

                                                                                                              BeanFactoryPostProcessor       PriorityOrdered

                                                                                                                                               |                      |

PropertyPlaceholderConfigurer  -->  PlaceholderConfigurerSupport  --> PropertyResourceConfigurer  -- > propertiesLoaderSupport 

                                                                 |                            |

                                                                 |                            |

                                                         BeanNameAware   BeanFactoryAware

 

1、PropertiesLoaderSupport 有Source[] locations属性,XML配置文件中locations将设置到此属性,设置时将String类型转换为Resource类型

2、PropertyResourceConfigurer 两个接口 BeanFactoryPostProcessor和priorityOrdered,

BeanFactoryPostProcessor接口在refresh()中invokeBeanFactoryPostProcessor(BeanFactory)中执行,

PriorityOrdered保证方法中最先执行BeanFactoryPostProcessor的postProcessorBeanFactory()方法

3、PropertyPlaceholderConfigurer  可以设置值可以来自 系统参数和配置文件中参数

 

PropertyPlaceholderConfigurer

原文:https://www.cnblogs.com/zhongchang/p/11972451.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!