Class ConfigServicePropertySourceLocator
java.lang.Object
org.springframework.cloud.config.client.ConfigServicePropertySourceLocator
- All Implemented Interfaces:
org.springframework.cloud.bootstrap.config.PropertySourceLocator
@Order(0)
public class ConfigServicePropertySourceLocator
extends Object
implements org.springframework.cloud.bootstrap.config.PropertySourceLocator
- Author:
- Dave Syer, Mathieu Ouellet, Marnee DeRider
-
Constructor Summary
ConstructorsConstructorDescriptionConfigServicePropertySourceLocator(ConfigClientProperties defaultProperties) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.core.env.PropertySource<?>locate(org.springframework.core.env.Environment environment) Collection<org.springframework.core.env.PropertySource<?>>locateCollection(org.springframework.core.env.Environment environment) voidsetAdditionalInterceptors(List<org.springframework.http.client.ClientHttpRequestInterceptor> additionalInterceptors) AdditionalClientHttpRequestInterceptors applied to theRestTemplatebuilt perlocate(org.springframework.core.env.Environment)call.voidsetRestTemplate(org.springframework.web.client.RestTemplate restTemplate)
-
Constructor Details
-
ConfigServicePropertySourceLocator
-
-
Method Details
-
setAdditionalInterceptors
public void setAdditionalInterceptors(List<org.springframework.http.client.ClientHttpRequestInterceptor> additionalInterceptors) AdditionalClientHttpRequestInterceptors applied to theRestTemplatebuilt perlocate(org.springframework.core.env.Environment)call. Used byConfigServiceBootstrapConfigurationto attach the OAuth2 bearer-token interceptor whenspring-security-oauth2-clientis on the classpath.- Parameters:
additionalInterceptors- the interceptors to apply
-
locate
public org.springframework.core.env.PropertySource<?> locate(org.springframework.core.env.Environment environment) - Specified by:
locatein interfaceorg.springframework.cloud.bootstrap.config.PropertySourceLocator
-
locateCollection
public Collection<org.springframework.core.env.PropertySource<?>> locateCollection(org.springframework.core.env.Environment environment) - Specified by:
locateCollectionin interfaceorg.springframework.cloud.bootstrap.config.PropertySourceLocator
-
setRestTemplate
public void setRestTemplate(org.springframework.web.client.RestTemplate restTemplate)
-