diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringBootBanner.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringBootBanner.java
index 967eca784f..eabfd3f5fa 100644
--- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringBootBanner.java
+++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringBootBanner.java
@@ -30,10 +30,14 @@ import org.springframework.core.env.Environment;
*/
class SpringBootBanner implements Banner {
- private static final String[] BANNER = { "", " . ____ _ __ _ _",
- " /\\\\ / ___'_ __ _ _(_)_ __ __ _ \\ \\ \\ \\", "( ( )\\___ | '_ | '_| | '_ \\/ _` | \\ \\ \\ \\",
- " \\\\/ ___)| |_)| | | | | || (_| | ) ) ) )", " ' |____| .__|_| |_|_| |_\\__, | / / / /",
- " =========|_|==============|___/=/_/_/_/" };
+ private static final String BANNER = """
+ . ____ _ __ _ _
+ /\\\\ / ___'_ __ _ _(_)_ __ __ _ \\ \\ \\ \\
+ ( ( )\\___ | '_ | '_| | '_ \\/ _` | \\ \\ \\ \\
+ \\\\/ ___)| |_)| | | | | || (_| | ) ) ) )
+ ' |____| .__|_| |_|_| |_\\__, | / / / /
+ =========|_|==============|___/=/_/_/_/
+ """;
private static final String SPRING_BOOT = " :: Spring Boot :: ";
@@ -41,16 +45,12 @@ class SpringBootBanner implements Banner {
@Override
public void printBanner(Environment environment, Class> sourceClass, PrintStream printStream) {
- for (String line : BANNER) {
- printStream.println(line);
- }
- String version = SpringBootVersion.getVersion();
- version = (version != null) ? " (v" + version + ")" : "";
+ printStream.println(BANNER);
+ String version = String.format(" (v%s)", SpringBootVersion.getVersion());
StringBuilder padding = new StringBuilder();
while (padding.length() < STRAP_LINE_SIZE - (version.length() + SPRING_BOOT.length())) {
padding.append(" ");
}
-
printStream.println(AnsiOutput.toString(AnsiColor.GREEN, SPRING_BOOT, AnsiColor.DEFAULT, padding.toString(),
AnsiStyle.FAINT, version));
printStream.println();
diff --git a/src/checkstyle/checkstyle-suppressions.xml b/src/checkstyle/checkstyle-suppressions.xml
index fdec73a163..c536a97c6c 100644
--- a/src/checkstyle/checkstyle-suppressions.xml
+++ b/src/checkstyle/checkstyle-suppressions.xml
@@ -82,4 +82,5 @@
+