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
This commit is contained in:
Phillip Webb 2021-01-28 18:48:32 -08:00
commit 745dbaff9c
1 changed files with 9 additions and 0 deletions

View File

@ -150,6 +150,15 @@ You can also use the configprop:spring.main.banner-mode[] property to determine
The printed banner is registered as a singleton bean under the following name: `springBootBanner`.
[NOTE]
====
The `${application.version}` and `${application.formatted-version}` properties are only available if you are using Spring Boot launchers.
The values won't be resolved if you are running an unpacked jar and starting it with `java -cp <classpath> <mainclass>`.
This is why we recommend that you always use 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.
====
[[boot-features-customizing-spring-application]]