From 747291c0b7a4ce081dddfef9e5a711c19d2b4113 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Tue, 31 Oct 2023 11:28:17 +0000 Subject: [PATCH] Clarify docs on when application.* banner properties will work Closes gh-33489 --- .../src/docs/asciidoc/features/spring-application.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/spring-application.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/spring-application.adoc index 2494321e2e5..eed04079c1d 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/spring-application.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/spring-application.adoc @@ -131,11 +131,11 @@ The printed banner is registered as a singleton bean under the following name: ` [NOTE] ==== -The `${application.version}` and `${application.formatted-version}` properties are only available if you are using Spring Boot launchers. +The `application.title`, `application.version`, and `application.formatted-version` properties are only available if you are using `java -jar` or `java -cp` with Spring Boot launchers. The values will not be resolved if you are running an unpacked jar and starting it with `java -cp `. -This is why we recommend that you always launch unpacked jars using `java org.springframework.boot.loader.JarLauncher`. -This will initialize the `application.*` banner variables before building the classpath and launching your app. +To use the `application.*` properties, launch your application as a packed jar using `java -jar` or as an unpacked jar using `java org.springframework.boot.loader.JarLauncher`. +This will initialize the `application.*` banner properties before building the classpath and launching your app. ====