Rename Banner.write method to printBanner
Rename Banner.write to Banner.printBanner for consistency with the now deprecated SpringApplication.printBanner method.
This commit is contained in:
parent
d0231d0dbe
commit
a6e6e1e07a
|
@ -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 {
|
||||||
}
|
}
|
||||||
|
|
||||||
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 {
|
||||||
*/
|
*/
|
||||||
@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 {
|
||||||
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 {
|
||||||
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");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue