Fix local dependent writing of banner into ByteArrayOutputStream
See gh-39601
This commit is contained in:
committed by
Moritz Halbritter
parent
d2136e5017
commit
f82a5e10db
@@ -96,8 +96,8 @@ class SpringApplicationBannerPrinter {
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user