Skip to content

Instantly share code, notes, and snippets.

@codethereforam
Created September 10, 2019 05:54
Show Gist options
  • Save codethereforam/914bc93d9c0e1fc46b647c0bddf9e356 to your computer and use it in GitHub Desktop.
Save codethereforam/914bc93d9c0e1fc46b647c0bddf9e356 to your computer and use it in GitHub Desktop.
enable springboot shutdown endpoint
  1. add maven dependency
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
  1. modify application.properties(.yml)
  • springboot1
    endpoints.shutdown.enabled=true
    endpoints.shutdown.sensitive=false
  • springboot2
    management:
      endpoint:
        shutdown:
          enabled: true
      endpoints:
        web:
          exposure:
            include: shutdown
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment