Commit a6e6e1e0 authored by Phillip Webb's avatar Phillip Webb

Rename Banner.write method to printBanner

Rename Banner.write to Banner.printBanner for consistency with the
now deprecated SpringApplication.printBanner method.
parent d0231d0d
...@@ -30,10 +30,10 @@ import org.springframework.core.env.Environment; ...@@ -30,10 +30,10 @@ import org.springframework.core.env.Environment;
public interface Banner { 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 environment the spring environment
* @param out the output print stream * @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 { ...@@ -487,7 +487,7 @@ public class SpringApplication {
} }
if (this.banner != null) { if (this.banner != null) {
this.banner.write(environment, System.out); this.banner.printBanner(environment, System.out);
return; return;
} }
...@@ -517,7 +517,7 @@ public class SpringApplication { ...@@ -517,7 +517,7 @@ public class SpringApplication {
*/ */
@Deprecated @Deprecated
protected void printBanner() { protected void printBanner() {
DEFAULT_BANNER.write(null, System.out); DEFAULT_BANNER.printBanner(null, System.out);
} }
/** /**
......
...@@ -45,7 +45,7 @@ class SpringBootBanner implements Banner { ...@@ -45,7 +45,7 @@ class SpringBootBanner implements Banner {
private static final int STRAP_LINE_SIZE = 42; private static final int STRAP_LINE_SIZE = 42;
@Override @Override
public void write(Environment environment, PrintStream printStream) { public void printBanner(Environment environment, PrintStream printStream) {
for (String line : BANNER) { for (String line : BANNER) {
printStream.println(line); printStream.println(line);
} }
......
...@@ -58,7 +58,7 @@ public class BannerTests { ...@@ -58,7 +58,7 @@ public class BannerTests {
static class DummyBanner implements Banner { static class DummyBanner implements Banner {
@Override @Override
public void write(Environment environment, PrintStream out) { public void printBanner(Environment environment, PrintStream out) {
out.println("My Banner"); out.println("My Banner");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment