File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
spring-boot-project/spring-boot-docs/src/docs/asciidoc Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -150,8 +150,14 @@ You can also use the configprop:spring.main.banner-mode[] property to determine
150
150
151
151
The printed banner is registered as a singleton bean under the following name: `springBootBanner`.
152
152
153
- NOTE: If you are running with an unpacked jar (and not using the Spring Boot launcher), `application.*` properties are not available.
154
- As a workaround, you can use JarLauncher to start the app (for example, `java -cp . org.springframework.boot.loader.JarLauncher`).
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
+ ====
155
161
156
162
157
163
You can’t perform that action at this time.
0 commit comments