Replace usage of deprecated Spring Framework methods
See gh-28642
This commit is contained in:
parent
16f54d2c5c
commit
33953823fc
|
@ -102,7 +102,10 @@ public class ManagementServerProperties {
|
|||
}
|
||||
|
||||
private String cleanBasePath(String basePath) {
|
||||
String candidate = StringUtils.trimWhitespace(basePath);
|
||||
String candidate = null;
|
||||
if (StringUtils.hasLength(basePath)) {
|
||||
candidate = basePath.strip();
|
||||
}
|
||||
if (StringUtils.hasText(candidate)) {
|
||||
if (!candidate.startsWith("/")) {
|
||||
candidate = "/" + candidate;
|
||||
|
|
|
@ -262,7 +262,10 @@ public class ServerProperties {
|
|||
}
|
||||
|
||||
private String cleanContextPath(String contextPath) {
|
||||
String candidate = StringUtils.trimWhitespace(contextPath);
|
||||
String candidate = null;
|
||||
if (StringUtils.hasLength(contextPath)) {
|
||||
candidate = contextPath.strip();
|
||||
}
|
||||
if (StringUtils.hasText(candidate) && candidate.endsWith("/")) {
|
||||
return candidate.substring(0, candidate.length() - 1);
|
||||
}
|
||||
|
|
|
@ -52,7 +52,10 @@ public class WebFluxProperties {
|
|||
}
|
||||
|
||||
private String cleanBasePath(String basePath) {
|
||||
String candidate = StringUtils.trimWhitespace(basePath);
|
||||
String candidate = null;
|
||||
if (StringUtils.hasLength(basePath)) {
|
||||
candidate = basePath.strip();
|
||||
}
|
||||
if (StringUtils.hasText(candidate)) {
|
||||
if (!candidate.startsWith("/")) {
|
||||
candidate = "/" + candidate;
|
||||
|
|
|
@ -306,7 +306,10 @@ public class LoggingApplicationListener implements GenericApplicationListener {
|
|||
}
|
||||
|
||||
private void initializeSystem(ConfigurableEnvironment environment, LoggingSystem system, LogFile logFile) {
|
||||
String logConfig = StringUtils.trimWhitespace(environment.getProperty(CONFIG_PROPERTY));
|
||||
String logConfig = environment.getProperty(CONFIG_PROPERTY);
|
||||
if (StringUtils.hasLength(logConfig)) {
|
||||
logConfig = logConfig.strip();
|
||||
}
|
||||
try {
|
||||
LoggingInitializationContext initializationContext = new LoggingInitializationContext(environment);
|
||||
if (ignoreLogConfig(logConfig)) {
|
||||
|
|
Loading…
Reference in New Issue