Skip to content

Commit 22f4491

Browse files
committed
Polish "Add metadata entry for spring.main.register-shutdown-hook"
See gh-18581
1 parent 9b78144 commit 22f4491

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@ Rather, pick only the properties that you need.
120120
# APPLICATION SETTINGS ({spring-boot-module-code}/SpringApplication.java[SpringApplication])
121121
spring.main.allow-bean-definition-overriding=false # Whether bean definition overriding, by registering a definition with the same name as an existing definition, is allowed.
122122
spring.main.banner-mode=console # Mode used to display the banner when the application runs.
123+
spring.main.register-shutdown-hook=true # Whether the application should have a shutdown hook registered.
123124
spring.main.sources= # Sources (class names, package names, or XML resource locations) to include in the ApplicationContext.
124125
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.
126126
127127
# FILE ENCODING ({spring-boot-module-code}/context/FileEncodingApplicationListener.java[FileEncodingApplicationListener])
128128
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 & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,13 @@
607607
"description": "Mode used to display the banner when the application runs.",
608608
"defaultValue": "console"
609609
},
610+
{
611+
"name": "spring.main.register-shutdown-hook",
612+
"type": "java.lang.Boolean",
613+
"sourceType": "org.springframework.boot.SpringApplication",
614+
"description": "Whether the application should have a shutdown hook registered.",
615+
"defaultValue": true
616+
},
610617
{
611618
"name": "spring.main.show-banner",
612619
"type": "java.lang.Boolean",
@@ -629,13 +636,6 @@
629636
"sourceType": "org.springframework.boot.SpringApplication",
630637
"description": "Flag to explicitly request a specific type of web application. If not set, auto-detected based on the classpath."
631638
},
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-
},
639639
{
640640
"name": "spring.main.web-environment",
641641
"type": "java.lang.Boolean",

0 commit comments

Comments
 (0)