Skip to content

Commit 89b11b0

Browse files
committed
Upgrade to Liquibase 3.10.3
This commit upgrades to Liquibase 3.10.3 and adds an explicit exclude check as this version started to include a "banner.txt" at the root of the classpath. Given it may override a banner configured by the user it is ignored so that the default banner is displayed. Users impacted by this change can rename their banner and configure the "spring.banner.location" property to point to it. Closes gh-23658
1 parent e81877e commit 89b11b0

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

spring-boot-project/spring-boot-dependencies/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -936,7 +936,7 @@ bom {
936936
]
937937
}
938938
}
939-
library("Liquibase", "3.10.2") {
939+
library("Liquibase", "3.10.3") {
940940
group("org.liquibase") {
941941
modules = [
942942
"liquibase-core" {

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplicationBannerPrinter.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2019 the original author or authors.
2+
* Copyright 2012-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -17,6 +17,7 @@
1717
package org.springframework.boot;
1818

1919
import java.io.ByteArrayOutputStream;
20+
import java.io.IOException;
2021
import java.io.PrintStream;
2122
import java.io.UnsupportedEncodingException;
2223
import java.util.ArrayList;
@@ -88,8 +89,13 @@ private Banner getBanner(Environment environment) {
8889
private Banner getTextBanner(Environment environment) {
8990
String location = environment.getProperty(BANNER_LOCATION_PROPERTY, DEFAULT_BANNER_LOCATION);
9091
Resource resource = this.resourceLoader.getResource(location);
91-
if (resource.exists()) {
92-
return new ResourceBanner(resource);
92+
try {
93+
if (resource.exists() && !resource.getURL().toExternalForm().contains("liquibase-core")) {
94+
return new ResourceBanner(resource);
95+
}
96+
}
97+
catch (IOException ex) {
98+
// Ignore
9399
}
94100
return null;
95101
}

0 commit comments

Comments
 (0)