Skip to content

Commit 9b78144

Browse files
polarbear567snicoll
authored andcommitted
Add metadata entry for spring.main.register-shutdown-hook
See gh-18581
1 parent 34287fd commit 9b78144

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ Rather, pick only the properties that you need.
122122
spring.main.banner-mode=console # Mode used to display the banner when the application runs.
123123
spring.main.sources= # Sources (class names, package names, or XML resource locations) to include in the ApplicationContext.
124124
spring.main.web-application-type= # Flag to explicitly request a specific type of web application. If not set, auto-detected based on the classpath.
125+
spring.main.register-shutdown-hook=true # Whether shutdown hooks are automatically registered when Spring Boot start. If not set, they are automatically registered.
125126
126127
# FILE ENCODING ({spring-boot-module-code}/context/FileEncodingApplicationListener.java[FileEncodingApplicationListener])
127128
spring.mandatory-file-encoding= # Expected character encoding the application must use.

spring-boot-project/spring-boot/src/main/resources/META-INF/additional-spring-configuration-metadata.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,13 @@
629629
"sourceType": "org.springframework.boot.SpringApplication",
630630
"description": "Flag to explicitly request a specific type of web application. If not set, auto-detected based on the classpath."
631631
},
632+
{
633+
"name": "spring.main.register-shutdown-hook",
634+
"type": "java.lang.Boolean",
635+
"sourceType": "org.springframework.boot.SpringApplication",
636+
"description": "Whether shutdown hooks are automatically registered when Spring Boot start. If not set, they are automatically registered.",
637+
"defaultValue": true
638+
},
632639
{
633640
"name": "spring.main.web-environment",
634641
"type": "java.lang.Boolean",

0 commit comments

Comments
 (0)