From d058ddbe3bbe4bd3649985087dded39e2fc2712c Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Thu, 7 Apr 2016 23:10:48 -0700 Subject: [PATCH] Add image banner documentation Closes gh-4647 --- .../src/main/asciidoc/appendix-application-properties.adoc | 5 +++++ spring-boot-docs/src/main/asciidoc/howto.adoc | 6 +++--- .../src/main/asciidoc/spring-boot-features.adoc | 5 ++++- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc b/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc index 4b58d908b6..88c4933b36 100644 --- a/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc +++ b/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc @@ -31,6 +31,11 @@ content into your application; rather pick only the properties that you need. # BANNER banner.charset=UTF-8 # Banner file encoding. banner.location=classpath:banner.txt # Banner file location. + banner.image.location=classpath:banner.gif # (Banner image file location, jpg/png can also be used). + banner.image.width= # Width of the banner image in chars (default 76) + banner.image.hight= # Height of the banner image in chars (default based on image height) + banner.image.margin= # Left hand image margin in chars (default 2) + banner.image.invert= # If images should be inverted for dark terminal themes (default false) # LOGGING logging.config= # Location of the logging configuration file. For instance `classpath:logback.xml` for Logback diff --git a/spring-boot-docs/src/main/asciidoc/howto.adoc b/spring-boot-docs/src/main/asciidoc/howto.adoc index ce2e239396..03a450aaa6 100644 --- a/spring-boot-docs/src/main/asciidoc/howto.adoc +++ b/spring-boot-docs/src/main/asciidoc/howto.adoc @@ -212,8 +212,8 @@ might have. [source,properties,indent=0,subs="verbatim,quotes,attributes"] ---- - spring.main.web_environment=false - spring.main.banner_mode=off + spring.main.web-environment=false + spring.main.banner-mode=off ---- and then the Spring Boot banner will not be printed on startup, and the application will @@ -239,7 +239,7 @@ used with the following configuration: [source,properties,indent=0,subs="verbatim,quotes,attributes"] ---- spring.main.sources=com.acme.Config,com.acme.ExtraConfig - spring.main.banner_mode=console + spring.main.banner-mode=console ---- The actual application will _now_ show the banner (as overridden by configuration) and use 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 62b61512cd..c10217bf8a 100644 --- a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -52,8 +52,11 @@ such as the user that launched the application. The banner that is printed on start up can be changed by adding a `banner.txt` file to your classpath, or by setting `banner.location` to the location of such a file. If the file has an unusual encoding you can set `banner.charset` (default is `UTF-8`). +In addition a text file, you can also add a `banner.gif`, `banner.jpg` or `banner.png` +image file to your classpath, or set a `banner.image.location` property. Images will be +converted into an ASCII art representation and printed above any text banner. -You can use the following variables inside your `banner.txt` file: +Inside your `banner.txt` file you can use any of the following placeholders: .Banner variables |===