Skip to content

Commit 745dbaf

Browse files
committed
Merge pull request #24982 from robert-smith-911
* pr/24982: Polish 'Add note about exploded jars and banner properties' Add note about exploded jars and banner properties Closes gh-24982
2 parents 7265484 + 5b2d1f1 commit 745dbaf

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

spring-boot-project/spring-boot-docs/src/docs/asciidoc/spring-boot-features.adoc

+9
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,15 @@ You can also use the configprop:spring.main.banner-mode[] property to determine
150150

151151
The printed banner is registered as a singleton bean under the following name: `springBootBanner`.
152152

153+
[NOTE]
154+
====
155+
The `${application.version}` and `${application.formatted-version}` properties are only available if you are using Spring Boot launchers.
156+
The values won't be resolved if you are running an unpacked jar and starting it with `java -cp <classpath> <mainclass>`.
157+
158+
This is why we recommend that you always use launch unpacked jars using `java org.springframework.boot.loader.JarLauncher`.
159+
This will initialize the `application.*` banner variables before building the classpath and launching your app.
160+
====
161+
153162

154163

155164
[[boot-features-customizing-spring-application]]

0 commit comments

Comments
 (0)