advancedSpring Internals — Bean Lifecycle & Proxies
Why can SmartInitializingSingleton trigger expensive database calls before your application is actually ready?
SmartInitializingSingleton.afterSingletonsInstantiated() runs once ALL singleton beans are created, but before the application context is fully refreshed and ApplicationReadyEvent fires — code here that does eager DB warm-up can run before readiness probes or downstream dependencies expect traffic.
This is a Pro question
Sign in, then upgrade to Pro or Power to unlock this question and the full Interview Prep bank.
Why can SmartInitializingSingleton trigger expensive database calls before your application is actually ready?