63 Star 427 Fork 156

huifer/Code-Analysis

Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
文件
docs
beans
core
env
PropertyResolver
PlaceholderResolver
PropertySource
images
Readme.md
Spring-CommandLinePropertySource.md
Spring-ComparisonPropertySource.md
Spring-CompositePropertySource.md
Spring-EnumerablePropertySource.md
Spring-MapPropertySource.md
Spring-MockPropertySource.md
Spring-PropertiesPropertySource.md
Spring-ResourcePropertySource.md
Spring-ServletConfigPropertySource.md
Spring-ServletContextPropertySource.md
Spring-SimpleCommandLineArgsParser.md
Spring-SimpleCommandLinePropertySource.md
Spring-StubPropertySource.md
Spring-SystemEnvironmentPropertySource.md
images
Readme.md
Spring-AbstractPropertyResolver.md
Spring-Environment.md
Spring-PropertyPlaceholderHelper.md
Spring-PropertyResolver.md
Spring-PropertySources.md
Spring-PropertySourcesPropertyResolver.md
environment
other
utils
release
.gitattributes
.gitignore
CHANGELOG.MD
LICENSE
Notice
README.md
_coverpage.md
index.html
summary.md
todo.md
Clone or Download
Spring-PropertiesPropertySource.md 882 Bytes
Copy Edit Raw Blame History
huifer authored 5 years ago . :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();
      }
   }

}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/pychfarm_admin/code-analysis.git
git@gitee.com:pychfarm_admin/code-analysis.git
pychfarm_admin
code-analysis
Code-Analysis
v0.0.15

Search