runWhenHasCommandLinePropertiesLoadsWithCommandLineTakingPrecedence() — spring-boot Function Reference
Architecture documentation for the runWhenHasCommandLinePropertiesLoadsWithCommandLineTakingPrecedence() function in ConfigDataEnvironmentPostProcessorIntegrationTests.java from the spring-boot codebase.
Entity Profile
Dependency Diagram
graph TD 726c82da_27d4_e364_b164_00d13adf5424["runWhenHasCommandLinePropertiesLoadsWithCommandLineTakingPrecedence()"] bcb16b39_1cc9_8ad7_8ae2_fb817a35bf45["setEnvironment()"] 726c82da_27d4_e364_b164_00d13adf5424 -->|calls| bcb16b39_1cc9_8ad7_8ae2_fb817a35bf45 61bdfef1_4c77_f177_2d1a_f452f9d7a529["getProperty()"] 726c82da_27d4_e364_b164_00d13adf5424 -->|calls| 61bdfef1_4c77_f177_2d1a_f452f9d7a529 f5ecfeee_2faa_bfff_05c7_ad8e17034d42["run()"] 726c82da_27d4_e364_b164_00d13adf5424 -->|calls| f5ecfeee_2faa_bfff_05c7_ad8e17034d42 style 726c82da_27d4_e364_b164_00d13adf5424 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
core/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigDataEnvironmentPostProcessorIntegrationTests.java lines 354–367
@Test
@WithResource(name = "application.properties", content = """
my.property=frompropertiesfile
the.property=frompropertiesfile
""")
void runWhenHasCommandLinePropertiesLoadsWithCommandLineTakingPrecedence() {
StandardEnvironment environment = new StandardEnvironment();
environment.getPropertySources()
.addFirst(new SimpleCommandLinePropertySource("--the.property=fromcommandline"));
this.application.setEnvironment(environment);
ConfigurableApplicationContext context = this.application.run();
assertThat(context.getEnvironment().getProperty("the.property")).isEqualTo("fromcommandline");
assertThat(context.getEnvironment().getProperty("my.property")).isEqualTo("frompropertiesfile");
}
Domain
Subdomains
Source
Frequently Asked Questions
What does runWhenHasCommandLinePropertiesLoadsWithCommandLineTakingPrecedence() do?
runWhenHasCommandLinePropertiesLoadsWithCommandLineTakingPrecedence() is a function in the spring-boot codebase.
What does runWhenHasCommandLinePropertiesLoadsWithCommandLineTakingPrecedence() call?
runWhenHasCommandLinePropertiesLoadsWithCommandLineTakingPrecedence() calls 3 function(s): getProperty, run, setEnvironment.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free