mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Fix local dependent writing of banner into ByteArrayOutputStream
See gh-39601
This commit is contained in:
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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user