From 748878d26992fc9af26ebde82235818f3770838a Mon Sep 17 00:00:00 2001 From: Thorsten Schmidt Date: Fri, 16 Feb 2024 11:35:45 +0100 Subject: [PATCH] Fixed local dependent writing of banner into ByteArrayOutputStream --- .../springframework/boot/SpringApplicationBannerPrinter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplicationBannerPrinter.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplicationBannerPrinter.java index 4e744703e744..96f340432efd 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplicationBannerPrinter.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplicationBannerPrinter.java @@ -96,8 +96,8 @@ private Banner getTextBanner(Environment environment) { private String createStringFromBanner(Banner banner, Environment environment, Class mainApplicationClass) throws UnsupportedEncodingException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); - banner.printBanner(environment, mainApplicationClass, new PrintStream(baos)); String charset = environment.getProperty("spring.banner.charset", "UTF-8"); + banner.printBanner(environment, mainApplicationClass, new PrintStream(baos, false, charset)); return baos.toString(charset); }