Tagged articles
4 articles
Page 1 of 1
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Aug 5, 2025 · Backend Development

Master Spring Boot Lifecycle: Init & Destroy Callbacks Explained

This article explains Spring Boot’s bean lifecycle callbacks, covering InitializingBean and DisposableBean interfaces, @PostConstruct and @PreDestroy annotations, initMethod and destroyMethod configurations, as well as alternative approaches like SmartInitializingSingleton, ContextRefreshedEvent, and AutoCloseable, with code examples and execution order details.

DisposableBeanInitializingBeanLifecycle
0 likes · 7 min read
Master Spring Boot Lifecycle: Init & Destroy Callbacks Explained
Xuanwu Backend Tech Stack
Xuanwu Backend Tech Stack
Jul 1, 2025 · Backend Development

Mastering Spring Bean Initialization: @PostConstruct, InitializingBean, and init‑method Explained

This article explains the three Spring bean initialization callbacks—@PostConstruct, InitializingBean, and init‑method—their fixed execution order, underlying processing mechanisms, code examples, and guidance on choosing the most suitable approach for different development scenarios.

Bean InitializationInitializingBeanJava backend
0 likes · 9 min read
Mastering Spring Bean Initialization: @PostConstruct, InitializingBean, and init‑method Explained
Top Architect
Top Architect
May 25, 2021 · Backend Development

Spring Boot Resource Initialization: CommandLineRunner, ApplicationRunner, @Order, @PostConstruct, InitializingBean, and ApplicationListener

This article explains several Spring Boot techniques for initializing resources at application startup, including CommandLineRunner, ApplicationRunner, @Order, @PostConstruct, InitializingBean, and ApplicationListener, and provides code examples and usage guidelines for each method.

ApplicationListenerApplicationRunnerCommandLineRunner
0 likes · 8 min read
Spring Boot Resource Initialization: CommandLineRunner, ApplicationRunner, @Order, @PostConstruct, InitializingBean, and ApplicationListener