重写PropertySourcesPlaceholderConfigurer 实现自定义配置读取
重写PropertySourcesPlaceholderConfigurer的postProcessBeanFactory方法 实现 对配置文件中 ${}配置的自定义解析默认情况下 ${} 是读取本地配置文件的已存在配置 当不存在时 配置为NULL其中主要的代码是postProcessBeanFactory方法中的PropertySource 抽象类if (this.environment != null) { this.propertySources.a...
原创
2020-07-16 18:22:08 ·
1946 阅读 ·
0 评论