Tag

bean scanning

1 views collected around this technical thread.

Top Architecture Tech Stack
Top Architecture Tech Stack
Feb 24, 2025 · Backend Development

Optimizing SpringBoot Startup Time: Analyzing and Reducing Bean Scanning and Initialization Overheads

This article investigates why a SpringBoot service takes 6‑7 minutes to start, identifies the costly bean‑scanning and bean‑initialization phases, and demonstrates how to speed up startup to around 40 seconds using custom SpringApplicationRunListener, BeanPostProcessor monitoring, JavaConfig selective bean registration, and cache auto‑configuration adjustments.

AutoConfigurationCachePerformance Optimization
0 likes · 20 min read
Optimizing SpringBoot Startup Time: Analyzing and Reducing Bean Scanning and Initialization Overheads
macrozheng
macrozheng
Feb 5, 2025 · Backend Development

How to Cut Spring Boot Startup Time from 7 Minutes to 40 Seconds

This article explains why a SpringBoot service took 6‑7 minutes to start, shows how to pinpoint the bottlenecks using SpringApplicationRunListener and BeanPostProcessor, and presents concrete optimizations—reducing scan paths, manually registering beans, and fixing cache auto‑configuration—to shrink the local startup time to about 40 seconds.

Auto‑ConfigurationBeanPostProcessorCache
0 likes · 18 min read
How to Cut Spring Boot Startup Time from 7 Minutes to 40 Seconds