2828import org .apache .commons .logging .Log ;
2929import org .apache .commons .logging .LogFactory ;
3030
31+ import org .springframework .boot .context .properties .source .ConfigurationPropertySources ;
32+ import org .springframework .boot .env .DefaultPropertiesPropertySource ;
3133import org .springframework .cloud .autoconfigure .RefreshAutoConfiguration ;
3234import org .springframework .cloud .context .environment .EnvironmentChangeEvent ;
3335import org .springframework .cloud .context .scope .refresh .RefreshScope ;
@@ -51,16 +53,23 @@ public abstract class ContextRefresher {
5153
5254 protected final Log logger = LogFactory .getLog (getClass ());
5355
56+ protected static final String REFRESH_ARGS_PROPERTY_SOURCE = "refreshArgs" ;
57+
58+ /**
59+ * see {@link ConfigurationPropertySources#ATTACHED_PROPERTY_SOURCE_NAME}.
60+ */
61+ private static final String ATTACHED_PROPERTY_SOURCE_NAME = "configurationProperties" ;
62+
5463 protected static final String [] DEFAULT_PROPERTY_SOURCES = new String [] {
5564 // order matters, if cli args aren't first, things get messy
56- CommandLinePropertySource .COMMAND_LINE_PROPERTY_SOURCE_NAME , "defaultProperties" };
65+ CommandLinePropertySource .COMMAND_LINE_PROPERTY_SOURCE_NAME , DefaultPropertiesPropertySource . NAME };
5766
5867 protected Set <String > standardSources = new HashSet <>(
5968 Arrays .asList (StandardEnvironment .SYSTEM_PROPERTIES_PROPERTY_SOURCE_NAME ,
6069 StandardEnvironment .SYSTEM_ENVIRONMENT_PROPERTY_SOURCE_NAME ,
6170 StandardServletEnvironment .JNDI_PROPERTY_SOURCE_NAME ,
6271 StandardServletEnvironment .SERVLET_CONFIG_PROPERTY_SOURCE_NAME ,
63- StandardServletEnvironment .SERVLET_CONTEXT_PROPERTY_SOURCE_NAME , "configurationProperties" ));
72+ StandardServletEnvironment .SERVLET_CONTEXT_PROPERTY_SOURCE_NAME , ATTACHED_PROPERTY_SOURCE_NAME ));
6473
6574 protected final List <String > additionalPropertySourcesToRetain ;
6675
0 commit comments