Tag

PreDestroy

1 views collected around this technical thread.

Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jan 23, 2025 · Backend Development

Master Spring Boot Bean Destruction: From DisposableBean to AutoCloseable

This article explains Spring Boot 3 bean destruction techniques—including DisposableBean, @PreDestroy, @Bean destroyMethod, AutoCloseable, and custom inference—provides complete code examples, and announces a continuously updated Spring Boot 3 case collection PDF for developers.

AutoCloseableDisposableBeanPreDestroy
0 likes · 7 min read
Master Spring Boot Bean Destruction: From DisposableBean to AutoCloseable
Architecture Digest
Architecture Digest
Oct 13, 2023 · Backend Development

Graceful Shutdown of Spring Boot Applications: Avoiding kill -9 and Using Actuator, Custom Configurations, and PreDestroy

This article explains why using kill -9 to terminate Linux processes can cause data loss, demonstrates how to gracefully stop Spring Boot services with kill -15, the Actuator shutdown endpoint, and custom shutdown configurations, and shows how to add pre‑destroy hooks for backup tasks.

ActuatorGraceful ShutdownJava
0 likes · 19 min read
Graceful Shutdown of Spring Boot Applications: Avoiding kill -9 and Using Actuator, Custom Configurations, and PreDestroy
Selected Java Interview Questions
Selected Java Interview Questions
May 6, 2023 · Backend Development

Graceful Shutdown of Spring Boot Applications: Avoiding kill -9 and Using Actuator, Shutdown Hooks, and Custom Configurations

This article explains why using the violent kill -9 command can corrupt data in Java services, describes the four‑step graceful shutdown process, and provides multiple Spring Boot solutions—including SIGTERM, Actuator shutdown endpoint, custom Tomcat connector, and @PreDestroy data‑backup hooks—to stop services safely while handling thread interruptions.

ActuatorGraceful ShutdownJava
0 likes · 20 min read
Graceful Shutdown of Spring Boot Applications: Avoiding kill -9 and Using Actuator, Shutdown Hooks, and Custom Configurations
Selected Java Interview Questions
Selected Java Interview Questions
Feb 23, 2022 · Backend Development

Graceful Shutdown Techniques for Spring Boot Applications

The article explains why killing a Spring Boot process with SIGKILL is unsafe and presents five practical ways—using Actuator, closing the application context, writing a PID file, invoking SpringApplication.exit, and creating a custom shutdown controller—to achieve a graceful shutdown while ensuring @PreDestroy methods run and resources are released.

ActuatorGraceful ShutdownJava
0 likes · 7 min read
Graceful Shutdown Techniques for Spring Boot Applications
Java Captain
Java Captain
Jan 18, 2020 · Backend Development

Graceful Shutdown Techniques for Spring Boot Applications

This article explains why graceful shutdown is important for Spring Boot services and demonstrates five practical methods—including Actuator shutdown, context closing, PID file handling, SpringApplication.exit, and a custom controller—each with complete code examples and usage instructions.

ActuatorGraceful ShutdownJava
0 likes · 8 min read
Graceful Shutdown Techniques for Spring Boot Applications