Add support for ANSI colored resource banners

Add AnsiPropertySource which allows named ANSI codes to be resolved
and update ResourceBanner to include it.

This commit also deprecates constants defined in AnsiElement and
replaces them with AnsiStyle, AnsiColor and AnsiBackground enums.

Closes gh-2704
This commit is contained in:
Geoffrey Chandler
2015-03-23 14:58:56 -07:00
committed by Phillip Webb
parent 9f143ad9ab
commit d6200389eb
12 changed files with 512 additions and 14 deletions

View File

@@ -72,6 +72,10 @@ display (surrounded with brackets and prefixed with `v`). For example `(v1.0)`.
|`${spring-boot.formatted-version}`
|The Spring Boot version that you are using formatted for display (surrounded with
brackets and prefixed with `v`). For example `(v{spring-boot-version})`.
|`${Ansi.NAME}`,
|Where `NAME` is the name of an ANSI escape code. See
{sc-spring-boot}/ansi/AnsiPropertySource.{sc-ext}[`AnsiPropertySource`] for details.
|===
TIP: The `SpringBootApplication.setBanner(...)` method can be used if you want to generate