run() — spring-boot Function Reference
Architecture documentation for the run() function in SpringApplicationBuilder.java from the spring-boot codebase.
Entity Profile
Dependency Diagram
graph TD 3613e214_49bf_015b_c43f_7f8a1274fb0b["run()"] 50463d98_125e_452a_318f_13449cca84e4["configureAsChildIfNecessary()"] 50463d98_125e_452a_318f_13449cca84e4 -->|calls| 3613e214_49bf_015b_c43f_7f8a1274fb0b f5eedfd8_bea7_b789_0861_3f23f0193b8d["runAndExtractParent()"] f5eedfd8_bea7_b789_0861_3f23f0193b8d -->|calls| 3613e214_49bf_015b_c43f_7f8a1274fb0b c77fe8f7_09a5_9082_76b4_eaa5622da6dd["loggingSystemRegisteredInTheContext()"] c77fe8f7_09a5_9082_76b4_eaa5622da6dd -->|calls| 3613e214_49bf_015b_c43f_7f8a1274fb0b a967c565_3137_222a_1da8_bb27e9fc105e["logFileRegisteredInTheContextWhenApplicable()"] a967c565_3137_222a_1da8_bb27e9fc105e -->|calls| 3613e214_49bf_015b_c43f_7f8a1274fb0b 7df18ae5_4388_cf89_197e_0eb635b31cfa["loggingPerformedDuringChildApplicationStartIsNotLost()"] 7df18ae5_4388_cf89_197e_0eb635b31cfa -->|calls| 3613e214_49bf_015b_c43f_7f8a1274fb0b c500488c_e08a_a1c3_3543_326e5cb63454["analysisIsPerformed()"] c500488c_e08a_a1c3_3543_326e5cb63454 -->|calls| 3613e214_49bf_015b_c43f_7f8a1274fb0b 7927402c_510f_9c31_3cd7_590f9f693299["notRegisteredWhenThereAreNoMBeanExporter()"] 7927402c_510f_9c31_3cd7_590f9f693299 -->|calls| 3613e214_49bf_015b_c43f_7f8a1274fb0b f23b00a6_d4cd_bb87_e0b3_465b54a47b97["notRegisteredByDefaultWhenThereAreMultipleMBeanExporters()"] f23b00a6_d4cd_bb87_e0b3_465b54a47b97 -->|calls| 3613e214_49bf_015b_c43f_7f8a1274fb0b 7a35dbf9_b8f3_54ab_5de8_097d0328d488["registeredWithPropertyWhenThereAreMultipleMBeanExporters()"] 7a35dbf9_b8f3_54ab_5de8_097d0328d488 -->|calls| 3613e214_49bf_015b_c43f_7f8a1274fb0b dd6885c0_1751_5df6_bfa9_e0274c1d28b4["registerWithCustomJmxNameWhenThereAreMultipleMBeanExporters()"] dd6885c0_1751_5df6_bfa9_e0274c1d28b4 -->|calls| 3613e214_49bf_015b_c43f_7f8a1274fb0b cd290cc3_c512_348f_0aea_acc9eedcb653["onlyRegisteredOnceWhenThereIsAChildContext()"] cd290cc3_c512_348f_0aea_acc9eedcb653 -->|calls| 3613e214_49bf_015b_c43f_7f8a1274fb0b bdbaeb8a_5326_2c5d_9dd5_b161413d3b29["load()"] bdbaeb8a_5326_2c5d_9dd5_b161413d3b29 -->|calls| 3613e214_49bf_015b_c43f_7f8a1274fb0b 60f23964_a964_410e_add0_9e7ca52f38f9["load()"] 60f23964_a964_410e_add0_9e7ca52f38f9 -->|calls| 3613e214_49bf_015b_c43f_7f8a1274fb0b b38169fd_396d_4b25_2b5d_ccfc92f6143f["run()"] b38169fd_396d_4b25_2b5d_ccfc92f6143f -->|calls| 3613e214_49bf_015b_c43f_7f8a1274fb0b style 3613e214_49bf_015b_c43f_7f8a1274fb0b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
core/spring-boot/src/main/java/org/springframework/boot/builder/SpringApplicationBuilder.java lines 144–159
public ConfigurableApplicationContext run(String... args) {
if (this.running.get()) {
ConfigurableApplicationContext context = this.context;
Assert.state(context != null, "No context set");
// If already created we just return the existing context
return context;
}
configureAsChildIfNecessary(args);
if (this.running.compareAndSet(false, true)) {
// If not already running copy the sources over and then run.
this.context = build().run(args);
}
ConfigurableApplicationContext context = this.context;
Assert.state(context != null, "No context set");
return context;
}
Domain
Subdomains
Called By
- addBootstrapRegistryInitializer()
- addBootstrapRegistryInitializerCanRegisterBeans()
- addProfiles()
- addProfilesOrderWithProperties()
- additionalProfilesOrderedBeforeActiveProfiles()
- analysisIsPerformed()
- applicationReadyEventHasReadyTime()
- applicationRunningEventListener()
- applicationStartedEventHasStartedTime()
- beanDefinitionOverridingCanBeEnabled()
- beanDefinitionOverridingIsDisabledByDefault()
- bindsBooleanAsStringBannerModeToSpringApplication()
- bindsEnvironmentPrefixToSpringApplication()
- bindsSystemPropertyToSpringApplication()
- bindsYamlStyleBannerModeToSpringApplication()
- circularReferencesAreDisabledByDefault()
- circularReferencesCanBeEnabled()
- commandLinePropertySource()
- commandLinePropertySourceEnhancesEnvironment()
- configureAsChildIfNecessary()
- contextRefreshedEventListener()
- contextUsesApplicationConversionService()
- contextWhenHasAddConversionServiceFalseUsesRegularConversionService()
- customApplicationStartupPublishStartupSteps()
- customBanner()
- customBannerWithProperties()
- customBeanNameGenerator()
- customEnvironment()
- customId()
- customResourceLoader()
- customResourceLoaderFromConstructor()
- defaultApplicationContext()
- disableCommandLinePropertySource()
- emptyCommandLinePropertySourceNotAdded()
- enableBannerInLogViaProperty()
- eventsArePublishedInExpectedOrder()
- failureResultsInSingleStackTrace()
- fromAppliesProfiles()
- fromReturnsApplicationContext()
- fromRunsWithAdditionalSources()
- fromWithMultipleApplicationsOnlyAppliesAdditionalSourcesOnce()
- getApplicationArgumentsBean()
- headless()
- headlessFalse()
- headlessSystemPropertyTakesPrecedence()
- lazyInitializationCanBeEnabled()
- lazyInitializationIgnoresBeansThatAreExplicitlyNotLazy()
- lazyInitializationIgnoresLazyInitializationExcludeFilteredBeans()
- lazyInitializationIsDisabledByDefault()
- load()
- load()
- logFileRegisteredInTheContextWhenApplicable()
- loggingPerformedDuringChildApplicationStartIsNotLost()
- loggingSystemRegisteredInTheContext()
- logsActiveProfilesWithMultipleProfiles()
- logsActiveProfilesWithSingleProfile()
- logsActiveProfilesWithoutProfileAndMultipleDefaults()
- logsActiveProfilesWithoutProfileAndSingleDefault()
- main()
- main()
- movesConfigClassPropertySourcesToEnd()
- nonWebApplicationConfiguredViaAPropertyHasTheCorrectTypeOfContextAndEnvironment()
- notRegisteredByDefaultWhenThereAreMultipleMBeanExporters()
- notRegisteredWhenThereAreNoMBeanExporter()
- onlyRegisteredOnceWhenThereIsAChildContext()
- propertiesFileEnhancesEnvironment()
- registerListener()
- registerListenerWithCustomMulticaster()
- registerWithCustomJmxNameWhenThereAreMultipleMBeanExporters()
- registeredWithPropertyWhenThereAreMultipleMBeanExporters()
- relaxedBindingShouldWorkBeforeEnvironmentIsPrepared()
- run()
- run()
- run()
- run()
- run()
- runAndExtractParent()
- runCommandLineRunnersAndApplicationRunners()
- runCommandLineRunnersAndApplicationRunnersUsingOrderOnBeanDefinitions()
- runCommandLineRunnersAndApplicationRunnersWithParentContext()
- settingEnvironmentPrefixViaPropertiesThrowsException()
- shouldStartDaemonThreadIfKeepAliveIsEnabled()
- shouldStopKeepAliveThreadIfContextIsClosed()
- shouldUseAotInitializer()
- sourcesMustBeAccessible()
- sourcesMustNotBeEmpty()
- sourcesMustNotBeNull()
- specificApplicationContextFactory()
- specificApplicationContextInitializer()
- triggersConfigFileApplicationListenerBeforeBinding()
- withCallableHookRunsWithHook()
- withHookWhenHookThrowsAbandonedRunExceptionAbandonsRun()
- withRunnableHookRunsWithHook()
Source
Frequently Asked Questions
What does run() do?
run() is a function in the spring-boot codebase.
What does run() call?
run() calls 3 function(s): build, configureAsChildIfNecessary, run.
What calls run()?
run() is called by 93 function(s): addBootstrapRegistryInitializer, addBootstrapRegistryInitializerCanRegisterBeans, addProfiles, addProfilesOrderWithProperties, additionalProfilesOrderedBeforeActiveProfiles, analysisIsPerformed, applicationReadyEventHasReadyTime, applicationRunningEventListener, and 85 more.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free