11/*
2- * Copyright 2012-2020 the original author or authors.
2+ * Copyright 2012-2025 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.
2727import org .apache .commons .logging .Log ;
2828import org .apache .commons .logging .LogFactory ;
2929
30+ import org .springframework .boot .DefaultPropertiesPropertySource ;
31+ import org .springframework .boot .context .properties .source .ConfigurationPropertySources ;
3032import org .springframework .cloud .autoconfigure .RefreshAutoConfiguration ;
3133import org .springframework .cloud .context .environment .EnvironmentChangeEvent ;
3234import org .springframework .cloud .context .scope .refresh .RefreshScope ;
@@ -52,16 +54,21 @@ public abstract class ContextRefresher {
5254
5355 protected static final String REFRESH_ARGS_PROPERTY_SOURCE = "refreshArgs" ;
5456
57+ /**
58+ * see {@link ConfigurationPropertySources#ATTACHED_PROPERTY_SOURCE_NAME}
59+ */
60+ private static final String ATTACHED_PROPERTY_SOURCE_NAME = "configurationProperties" ;
61+
5562 protected static final String [] DEFAULT_PROPERTY_SOURCES = new String [] {
5663 // order matters, if cli args aren't first, things get messy
57- CommandLinePropertySource .COMMAND_LINE_PROPERTY_SOURCE_NAME , "defaultProperties" };
64+ CommandLinePropertySource .COMMAND_LINE_PROPERTY_SOURCE_NAME , DefaultPropertiesPropertySource . NAME };
5865
5966 protected Set <String > standardSources = new HashSet <>(
6067 Arrays .asList (StandardEnvironment .SYSTEM_PROPERTIES_PROPERTY_SOURCE_NAME ,
6168 StandardEnvironment .SYSTEM_ENVIRONMENT_PROPERTY_SOURCE_NAME ,
6269 StandardServletEnvironment .JNDI_PROPERTY_SOURCE_NAME ,
6370 StandardServletEnvironment .SERVLET_CONFIG_PROPERTY_SOURCE_NAME ,
64- StandardServletEnvironment .SERVLET_CONTEXT_PROPERTY_SOURCE_NAME , "configurationProperties" ));
71+ StandardServletEnvironment .SERVLET_CONTEXT_PROPERTY_SOURCE_NAME , ATTACHED_PROPERTY_SOURCE_NAME ));
6572
6673 protected final List <String > additionalPropertySourcesToRetain ;
6774
0 commit comments