From 43b8e65eee7c23a7f7c3b61f8a436dc9cbfe5b96 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Fri, 27 Nov 2015 14:04:58 +0100 Subject: [PATCH] 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 --- .../src/main/asciidoc/spring-boot-features.adoc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc index 13c9f8fd25..f488b75c42 100644 --- a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -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