https://github.com/techprimers/graceful-shutdown-example
Spring Boot Graceful shutdown example
https://github.com/techprimers/graceful-shutdown-example
graceful-shutdown graceful-shutdowns shutdown-hook spring-boot spring-boot-2 spring-boot-shutdown
Last synced: 4 months ago
JSON representation
Spring Boot Graceful shutdown example
- Host: GitHub
- URL: https://github.com/techprimers/graceful-shutdown-example
- Owner: TechPrimers
- Created: 2020-04-02T15:31:57.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-04-02T15:39:15.000Z (over 5 years ago)
- Last Synced: 2025-05-25T02:44:41.494Z (4 months ago)
- Topics: graceful-shutdown, graceful-shutdowns, shutdown-hook, spring-boot, spring-boot-2, spring-boot-shutdown
- Language: Java
- Size: 52.7 KB
- Stars: 0
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Graceful Shutdown in Spring Boot
Grace Period for shutdown can be configured with `server.shutdown.grace-period` property.
- `/hello` returns `HelloWorld` and triggers a task internally which needs to be taken care before shutting down.
- `curl http://localhost:8080/hello -X GET` - Command used to trigger the endpoint
- By default `@PreDestroy` can be used to hook a custom implementation after tomcat says all requests are processed and timeout has expired.