configurePropertySources() — spring-boot Function Reference
Architecture documentation for the configurePropertySources() function in SpringApplication.java from the spring-boot codebase.
Entity Profile
Dependency Diagram
graph TD 536f59d2_fd82_d804_22b3_70a9d8ad8d3e["configurePropertySources()"] 7454fd0c_15bf_c5e0_c269_c1fe65124b65["configureEnvironment()"] 7454fd0c_15bf_c5e0_c269_c1fe65124b65 -->|calls| 536f59d2_fd82_d804_22b3_70a9d8ad8d3e 643fc08a_e5b9_5a58_e9bd_1cfe8bc9eaa6["addOrMerge()"] 536f59d2_fd82_d804_22b3_70a9d8ad8d3e -->|calls| 643fc08a_e5b9_5a58_e9bd_1cfe8bc9eaa6 87f0b21f_3955_8dcc_cc55_9c6321893f96["get()"] 536f59d2_fd82_d804_22b3_70a9d8ad8d3e -->|calls| 87f0b21f_3955_8dcc_cc55_9c6321893f96 style 536f59d2_fd82_d804_22b3_70a9d8ad8d3e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
core/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java lines 513–533
protected void configurePropertySources(ConfigurableEnvironment environment, String[] args) {
MutablePropertySources sources = environment.getPropertySources();
if (!CollectionUtils.isEmpty(this.defaultProperties)) {
DefaultPropertiesPropertySource.addOrMerge(this.defaultProperties, sources);
}
if (this.addCommandLineProperties && args.length > 0) {
String name = CommandLinePropertySource.COMMAND_LINE_PROPERTY_SOURCE_NAME;
PropertySource<?> source = sources.get(name);
if (source != null) {
CompositePropertySource composite = new CompositePropertySource(name);
composite
.addPropertySource(new SimpleCommandLinePropertySource("springApplicationCommandLineArgs", args));
composite.addPropertySource(source);
sources.replace(name, composite);
}
else {
sources.addFirst(new SimpleCommandLinePropertySource(args));
}
}
environment.getPropertySources().addLast(new ApplicationInfoPropertySource(this.mainApplicationClass));
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does configurePropertySources() do?
configurePropertySources() is a function in the spring-boot codebase.
What does configurePropertySources() call?
configurePropertySources() calls 2 function(s): addOrMerge, get.
What calls configurePropertySources()?
configurePropertySources() is called by 1 function(s): configureEnvironment.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free