Move field ContextRefresher.REFRESH_ARGS_PROPERTY_SOURCE down to LegacyContextRefresher (#1450)
It's specific to LegacyContextRefresher. Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
This commit is contained in:
committed by
Ryan Baxter
parent
94f22fdd18
commit
ee490fe7c8
@@ -92,9 +92,6 @@ public class ConfigDataContextRefresher extends ContextRefresher
|
|||||||
postProcessor.postProcessEnvironment(environment, application);
|
postProcessor.postProcessEnvironment(environment, application);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (environment.getPropertySources().contains(REFRESH_ARGS_PROPERTY_SOURCE)) {
|
|
||||||
environment.getPropertySources().remove(REFRESH_ARGS_PROPERTY_SOURCE);
|
|
||||||
}
|
|
||||||
MutablePropertySources target = getContext().getEnvironment().getPropertySources();
|
MutablePropertySources target = getContext().getEnvironment().getPropertySources();
|
||||||
String targetName = null;
|
String targetName = null;
|
||||||
for (PropertySource<?> source : environment.getPropertySources()) {
|
for (PropertySource<?> source : environment.getPropertySources()) {
|
||||||
|
|||||||
@@ -51,8 +51,6 @@ public abstract class ContextRefresher {
|
|||||||
|
|
||||||
protected final Log logger = LogFactory.getLog(getClass());
|
protected final Log logger = LogFactory.getLog(getClass());
|
||||||
|
|
||||||
protected static final String REFRESH_ARGS_PROPERTY_SOURCE = "refreshArgs";
|
|
||||||
|
|
||||||
protected static final String[] DEFAULT_PROPERTY_SOURCES = new String[] {
|
protected static final String[] DEFAULT_PROPERTY_SOURCES = new String[] {
|
||||||
// order matters, if cli args aren't first, things get messy
|
// order matters, if cli args aren't first, things get messy
|
||||||
CommandLinePropertySource.COMMAND_LINE_PROPERTY_SOURCE_NAME, "defaultProperties" };
|
CommandLinePropertySource.COMMAND_LINE_PROPERTY_SOURCE_NAME, "defaultProperties" };
|
||||||
|
|||||||
@@ -41,6 +41,8 @@ import static org.springframework.cloud.util.PropertyUtils.BOOTSTRAP_ENABLED_PRO
|
|||||||
*/
|
*/
|
||||||
public class LegacyContextRefresher extends ContextRefresher {
|
public class LegacyContextRefresher extends ContextRefresher {
|
||||||
|
|
||||||
|
private static final String REFRESH_ARGS_PROPERTY_SOURCE = "refreshArgs";
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public LegacyContextRefresher(ConfigurableApplicationContext context, RefreshScope scope) {
|
public LegacyContextRefresher(ConfigurableApplicationContext context, RefreshScope scope) {
|
||||||
super(context, scope);
|
super(context, scope);
|
||||||
|
|||||||
Reference in New Issue
Block a user