diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc index febfed2fc4..3f91d1ef08 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc @@ -122,6 +122,7 @@ Rather, pick only the properties that you need. spring.main.banner-mode=console # Mode used to display the banner when the application runs. spring.main.sources= # Sources (class names, package names, or XML resource locations) to include in the ApplicationContext. spring.main.web-application-type= # Flag to explicitly request a specific type of web application. If not set, auto-detected based on the classpath. + spring.main.register-shutdown-hook=true # Whether shutdown hooks are automatically registered when Spring Boot start. If not set, they are automatically registered. # FILE ENCODING ({spring-boot-module-code}/context/FileEncodingApplicationListener.java[FileEncodingApplicationListener]) spring.mandatory-file-encoding= # Expected character encoding the application must use. diff --git a/spring-boot-project/spring-boot/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/spring-boot-project/spring-boot/src/main/resources/META-INF/additional-spring-configuration-metadata.json index e52c61a6ea..fd47a2efaf 100644 --- a/spring-boot-project/spring-boot/src/main/resources/META-INF/additional-spring-configuration-metadata.json +++ b/spring-boot-project/spring-boot/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -629,6 +629,13 @@ "sourceType": "org.springframework.boot.SpringApplication", "description": "Flag to explicitly request a specific type of web application. If not set, auto-detected based on the classpath." }, + { + "name": "spring.main.register-shutdown-hook", + "type": "java.lang.Boolean", + "sourceType": "org.springframework.boot.SpringApplication", + "description": "Whether shutdown hooks are automatically registered when Spring Boot start. If not set, they are automatically registered.", + "defaultValue": true + }, { "name": "spring.main.web-environment", "type": "java.lang.Boolean",