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?

Next Step

Continue to What happens when two auto-configurations define the same bean with conflicting conditions?← Back to all Spring Boot & Microservices questions