prepareApplicationContext() — spring-boot Function Reference
Architecture documentation for the prepareApplicationContext() function in SpringApplicationAotProcessor.java from the spring-boot codebase.
Entity Profile
Dependency Diagram
graph TD 9e4118b0_ce2b_f7f6_55a9_0b9b6ff1be57["prepareApplicationContext()"] 48c7ea1c_ce58_1849_5cec_9584e30bc06a["AotProcessorHook()"] 9e4118b0_ce2b_f7f6_55a9_0b9b6ff1be57 -->|calls| 48c7ea1c_ce58_1849_5cec_9584e30bc06a a8cc3bc3_239f_fc27_e4a2_8252d75604ca["run()"] 9e4118b0_ce2b_f7f6_55a9_0b9b6ff1be57 -->|calls| a8cc3bc3_239f_fc27_e4a2_8252d75604ca c85c682e_b715_922d_7c4e_638c50eed248["getMainMethod()"] 9e4118b0_ce2b_f7f6_55a9_0b9b6ff1be57 -->|calls| c85c682e_b715_922d_7c4e_638c50eed248 style 9e4118b0_ce2b_f7f6_55a9_0b9b6ff1be57 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
core/spring-boot/src/main/java/org/springframework/boot/SpringApplicationAotProcessor.java lines 58–71
@Override
protected GenericApplicationContext prepareApplicationContext(Class<?> application) {
return new AotProcessorHook(application).run(() -> {
Method mainMethod = getMainMethod(application);
mainMethod.setAccessible(true);
if (mainMethod.getParameterCount() == 0) {
ReflectionUtils.invokeMethod(mainMethod, null);
}
else {
ReflectionUtils.invokeMethod(mainMethod, null, new Object[] { this.applicationArgs });
}
return Void.class;
});
}
Domain
Subdomains
Calls
- AotProcessorHook()
- getMainMethod()
- run()
Source
Frequently Asked Questions
What does prepareApplicationContext() do?
prepareApplicationContext() is a function in the spring-boot codebase.
What does prepareApplicationContext() call?
prepareApplicationContext() calls 3 function(s): AotProcessorHook, getMainMethod, run.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free