1 Star 0 Fork 156

whl595145999 / Spring-Analysis

forked from huifer / Code-Analysis 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Spring-PropertiesPropertySource.md 882 Bytes
一键复制 编辑 原始数据 按行查看 历史
huifer 提交于 2020-11-09 10:08 . :fire:doc: env + PropertyResolver

Spring PropertiesPropertySource

  • Author: HuiFer

  • 源码阅读仓库: SourceHot-spring

  • 全路径: org.springframework.core.env.PropertiesPropertySource

  • Properties 是map结构。可以做类型转换.

  • getPropertyNames 就转换成了父类MapPropertySource的方法了

    • map.keySet()
public class PropertiesPropertySource extends MapPropertySource {

   @SuppressWarnings({"rawtypes", "unchecked"})
   public PropertiesPropertySource(String name, Properties source) {
      super(name, (Map) source);
   }

   protected PropertiesPropertySource(String name, Map<String, Object> source) {
      super(name, source);
   }


   @Override
   public String[] getPropertyNames() {
      synchronized (this.source) {
         return super.getPropertyNames();
      }
   }

}
Java
1
https://gitee.com/595145999/spring-analysis.git
git@gitee.com:595145999/spring-analysis.git
595145999
spring-analysis
Spring-Analysis
master

搜索帮助