Add dedicated section for spring.main.banner-mode

One of the options of the new `banner-mode` property is `off`. YAML maps
`off` to `false` and since we are exposing the method from the
`SpringApplication` public class we can't change the signature to accept
a `String` and do the conversion ourselves.

This commit adds a dedicated section in the guide to warn users about
that particular situation. Adding quotes around the value prevents the
conversion.

Closes gh-4600
This commit is contained in:
Stephane Nicoll
2015-11-27 14:04:58 +01:00
parent 4488bac4c3
commit 43b8e65eee

View File

@@ -82,7 +82,22 @@ TIP: The `SpringApplication.setBanner(...)` method can be used if you want to ge
a banner programmatically. Use the `org.springframework.boot.Banner` interface and
implement your own `printBanner()` method.
You can also use the `spring.main.banner-mode` property to determine if the banner has
to be printed on `System.out` (`console`), using the configured logger (`log`) or not
at all (`off`).
[NOTE]
====
YAML maps `off` to `false` so make sure to add quotes if you want to disable the
banner in your application.
[source,yaml,indent=0]
----
spring:
main:
banner-mode: "off"
----
====
[[boot-features-customizing-spring-application]]
=== Customizing SpringApplication