Merge branch '5.2.x'
# Conflicts: # build.gradle
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-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.
|
||||
@@ -296,11 +296,11 @@ public abstract class WebApplicationContextUtils {
|
||||
|
||||
Assert.notNull(sources, "'propertySources' must not be null");
|
||||
String name = StandardServletEnvironment.SERVLET_CONTEXT_PROPERTY_SOURCE_NAME;
|
||||
if (servletContext != null && sources.contains(name) && sources.get(name) instanceof StubPropertySource) {
|
||||
if (servletContext != null && sources.get(name) instanceof StubPropertySource) {
|
||||
sources.replace(name, new ServletContextPropertySource(name, servletContext));
|
||||
}
|
||||
name = StandardServletEnvironment.SERVLET_CONFIG_PROPERTY_SOURCE_NAME;
|
||||
if (servletConfig != null && sources.contains(name) && sources.get(name) instanceof StubPropertySource) {
|
||||
if (servletConfig != null && sources.get(name) instanceof StubPropertySource) {
|
||||
sources.replace(name, new ServletConfigPropertySource(name, servletConfig));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user