Performance: Running a Spring Boot application
MEDIUM IMPACT
This affects the startup time and initial responsiveness of the web application.
public static void main(String[] args) {
SpringApplication app = new SpringApplication(Application.class);
app.setLazyInitialization(true);
app.run(args);
}public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}| Pattern | Startup Time | Memory Usage | Responsiveness | Verdict |
|---|---|---|---|---|
| Default eager startup | 3-5 seconds | High | Delayed initial response | [X] Bad |
| Lazy initialization enabled | 1.5-3 seconds | Moderate | Faster initial response | [OK] Good |