Tagged articles

SmartInitializingSingleton

2 articles · Page 1 of 1
Shepherd Advanced Notes
Shepherd Advanced Notes
Oct 31, 2024 · Backend Development

How to Run Custom Code at Spring Boot Startup: 8 Implementation Options

This article explains eight ways to execute custom initialization logic during Spring Boot startup, covering CommandLineRunner, ApplicationRunner, ApplicationListener, @EventListener, @PostConstruct, BeanPostProcessor, InitializingBean, SmartInitializingSingleton, and the main method, with code examples and suitable use‑case guidance.

BeanPostProcessorCommandLineRunnerPostConstruct
0 likes · 10 min read
How to Run Custom Code at Spring Boot Startup: 8 Implementation Options
Architect
Architect
Jun 11, 2024 · Backend Development

Mastering Spring Boot Startup: 11 Critical Questions & Execution Order

This article provides a deep technical analysis of Spring Boot's startup process, explains every relevant extension point, demonstrates how to log and verify execution order with sample code, answers eleven common questions about bean initialization, and offers practical guidance on when to safely open RPC, MQ, and HTTP traffic.

AutowiredBean LifecycleCommandLineRunner
0 likes · 17 min read
Mastering Spring Boot Startup: 11 Critical Questions & Execution Order