Tagged articles
7 articles
Page 1 of 1
Java Tech Enthusiast
Java Tech Enthusiast
Sep 12, 2025 · Backend Development

Mastering Graceful Shutdown in Spring Boot: Hooks, Events, and @PreDestroy

Learn how to implement graceful shutdown in Spring Boot by understanding the JVM shutdown hook, customizing cleanup logic with ContextClosedEvent listeners and @PreDestroy annotations, and configuring the spring.main.register-shutdown-hook property to ensure resources are released safely during application termination.

ContextClosedEventGraceful ShutdownJava
0 likes · 9 min read
Mastering Graceful Shutdown in Spring Boot: Hooks, Events, and @PreDestroy
政采云技术
政采云技术
Feb 16, 2023 · Backend Development

Graceful Shutdown Support in Spring Boot 2.3+ for Embedded Web Servers

Spring Boot 2.3.0.RELEASE adds graceful shutdown for all embedded web servers, explaining the underlying SmartLifecycle mechanism, configuration steps, shutdown hook registration, and how timeout handling ensures existing requests finish while new requests are rejected.

Embedded Web ServerGraceful ShutdownJava
0 likes · 11 min read
Graceful Shutdown Support in Spring Boot 2.3+ for Embedded Web Servers
Architect's Tech Stack
Architect's Tech Stack
Nov 23, 2020 · Backend Development

Graceful Shutdown in Java: Using Shutdown Hooks and ThreadPool Management

This article explains the concept of graceful shutdown for Java services, demonstrates how to register shutdown hooks with Runtime.getRuntime().addShutdownHook, provides a complete code example using thread pools, shows the execution results, and discusses best practices for safely terminating applications.

Graceful ShutdownOperationsThreadPool
0 likes · 8 min read
Graceful Shutdown in Java: Using Shutdown Hooks and ThreadPool Management
Java Architecture Diary
Java Architecture Diary
May 18, 2020 · Operations

How to Implement Graceful Shutdown in Spring Boot 2.3 and Avoid Data Loss

Learn how Spring Boot 2.3’s built-in graceful shutdown works, configure it with server.shutdown=graceful, understand shutdown phases, timeout settings, and see code examples for handling shutdown hooks and actuator endpoints, ensuring active requests finish without data inconsistency across Tomcat, Jetty, Netty, and Undertow.

ActuatorGraceful ShutdownWeb server
0 likes · 5 min read
How to Implement Graceful Shutdown in Spring Boot 2.3 and Avoid Data Loss