Skip to content

Commit

Permalink
Polish 'Add note about exploded jars and banner properties'
Browse files Browse the repository at this point in the history
  • Loading branch information
philwebb committed Jan 29, 2021
1 parent 33c0381 commit 5b2d1f1
Showing 1 changed file with 8 additions and 2 deletions.
Expand Up @@ -150,8 +150,14 @@ 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: If you are running with an unpacked jar (and not using the Spring Boot launcher), `application.*` properties are not available.
As a workaround, you can use JarLauncher to start the app (for example, `java -cp . org.springframework.boot.loader.JarLauncher`).
[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.
====



Expand Down

0 comments on commit 5b2d1f1

Please sign in to comment.