63 Star 427 Fork 156

huifer/Code-Analysis

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
docs
beans
core
env
PropertyResolver
environment
images
Spring-AbstractEnvironment.md
Spring-ConfigurableEnvironment.md
Spring-ConfigurableWebEnvironment.md
Spring-Environment.md
Spring-MockEnvironment.md
Spring-StandardEnvironment.md
Spring-StandardServletEnvironment.md
readme.md
other
utils
release
.gitattributes
.gitignore
CHANGELOG.MD
LICENSE
Notice
README.md
_coverpage.md
index.html
summary.md
todo.md
克隆/下载
Spring-StandardEnvironment.md 687 Bytes
一键复制 编辑 原始数据 按行查看 历史
huifer 提交于 5年前 . :fire:doc: env + PropertyResolver

Spring StandardEnvironment

  • 类全路径: org.springframework.core.env.StandardEnvironment

  • 类图 StandardEnvironment

customizePropertySources

  • 处理属性源
    1. 获取 system property 放入资源对象
    2. 获取 system environment 放入资源对象

	@Override
	protected void customizePropertySources(MutablePropertySources propertySources) {
		propertySources.addLast(
				new PropertiesPropertySource(SYSTEM_PROPERTIES_PROPERTY_SOURCE_NAME, getSystemProperties()));
		propertySources.addLast(
				new SystemEnvironmentPropertySource(SYSTEM_ENVIRONMENT_PROPERTY_SOURCE_NAME, getSystemEnvironment()));
	}

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

搜索帮助