24
24
import static org .springframework .boot .ansi .AnsiElement .FAINT ;
25
25
import static org .springframework .boot .ansi .AnsiElement .GREEN ;
26
26
27
-
28
27
/**
29
28
* Writes the 'Spring' banner.
30
- *
29
+ *
31
30
* @author Phillip Webb
32
31
*/
33
32
abstract class Banner {
@@ -40,6 +39,10 @@ abstract class Banner {
40
39
" ' |____| .__|_| |_|_| |_\\ __, | / / / /" ,
41
40
" =========|_|==============|___/=/_/_/_/" };
42
41
42
+ private static final String SPRING_BOOT = " :: Spring Boot :: " ;
43
+
44
+ private static final int STRAP_LINE_SIZE = 42 ;
45
+
43
46
/**
44
47
* Write the banner to the specified print stream.
45
48
* @param printStream the output print stream
@@ -49,8 +52,16 @@ public static void write(PrintStream printStream) {
49
52
printStream .println (line );
50
53
}
51
54
String version = Banner .class .getPackage ().getImplementationVersion ();
52
- printStream .println (AnsiOutput .toString (GREEN , " Spring Boot" , DEFAULT ,
53
- FAINT , (version == null ? "" : " (v" + version + ")" )));
55
+ version = (version == null ? "" : " (v" + version + ")" );
56
+ version = " v0.5.0.BUILD.SNAPSHOT" ;
57
+ String padding = "" ;
58
+ while (padding .length () < STRAP_LINE_SIZE
59
+ - (version .length () + SPRING_BOOT .length ())) {
60
+ padding += " " ;
61
+ }
62
+
63
+ printStream .println (AnsiOutput .toString (GREEN , SPRING_BOOT , DEFAULT , padding ,
64
+ FAINT , version ));
54
65
printStream .println ();
55
66
}
56
67
}
0 commit comments