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
This commit is contained in:
Stephane Nicoll 2020-10-15 10:18:03 +02:00
parent e81877eb04
commit 89b11b0078
2 changed files with 10 additions and 4 deletions

View File

@ -936,7 +936,7 @@ bom {
]
}
}
library("Liquibase", "3.10.2") {
library("Liquibase", "3.10.3") {
group("org.liquibase") {
modules = [
"liquibase-core" {

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -17,6 +17,7 @@
package org.springframework.boot;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
@ -88,8 +89,13 @@ class SpringApplicationBannerPrinter {
private Banner getTextBanner(Environment environment) {
String location = environment.getProperty(BANNER_LOCATION_PROPERTY, DEFAULT_BANNER_LOCATION);
Resource resource = this.resourceLoader.getResource(location);
if (resource.exists()) {
return new ResourceBanner(resource);
try {
if (resource.exists() && !resource.getURL().toExternalForm().contains("liquibase-core")) {
return new ResourceBanner(resource);
}
}
catch (IOException ex) {
// Ignore
}
return null;
}