Rename Banner.write method to printBanner

Rename Banner.write to Banner.printBanner for consistency with the
now deprecated SpringApplication.printBanner method.
pull/1385/head
Phillip Webb 10 years ago
parent d0231d0dbe
commit a6e6e1e07a

@ -30,10 +30,10 @@ import org.springframework.core.env.Environment;
public interface Banner {
/**
* Write the banner to the specified print stream.
* Print the banner to the specified print stream.
* @param environment the spring environment
* @param out the output print stream
*/
void write(Environment environment, PrintStream out);
void printBanner(Environment environment, PrintStream out);
}

@ -487,7 +487,7 @@ public class SpringApplication {
}
if (this.banner != null) {
this.banner.write(environment, System.out);
this.banner.printBanner(environment, System.out);
return;
}
@ -517,7 +517,7 @@ public class SpringApplication {
*/
@Deprecated
protected void printBanner() {
DEFAULT_BANNER.write(null, System.out);
DEFAULT_BANNER.printBanner(null, System.out);
}
/**

@ -45,7 +45,7 @@ class SpringBootBanner implements Banner {
private static final int STRAP_LINE_SIZE = 42;
@Override
public void write(Environment environment, PrintStream printStream) {
public void printBanner(Environment environment, PrintStream printStream) {
for (String line : BANNER) {
printStream.println(line);
}

@ -58,7 +58,7 @@ public class BannerTests {
static class DummyBanner implements Banner {
@Override
public void write(Environment environment, PrintStream out) {
public void printBanner(Environment environment, PrintStream out) {
out.println("My Banner");
}

Loading…
Cancel
Save