public class NativeEnvironmentRepository extends Object implements EnvironmentRepository, SearchPathLocator, org.springframework.core.Ordered
EnvironmentRepository that uses a SpringApplication
and configuration files located through the normal protocols. The resulting Environment
is composed of property sources located using the application name as the config file
stem (spring.config.name) and the environment name as a Spring profile.SearchPathLocator.Locations| Constructor and Description |
|---|
NativeEnvironmentRepository(org.springframework.core.env.ConfigurableEnvironment environment,
NativeEnvironmentProperties properties) |
| Modifier and Type | Method and Description |
|---|---|
protected Environment |
clean(Environment env) |
protected Environment |
clean(Environment env,
Map<org.springframework.core.env.PropertySource<?>,org.springframework.cloud.config.server.environment.NativeEnvironmentRepository.PropertySourceConfigData> propertySourceToConfigData) |
Environment |
findOne(String config,
String profile,
String label) |
Environment |
findOne(String config,
String profile,
String label,
boolean includeOrigin) |
String |
getDefaultLabel() |
SearchPathLocator.Locations |
getLocations(String application,
String profile,
String label) |
int |
getOrder() |
String[] |
getSearchLocations() |
String |
getVersion() |
boolean |
isAddLabelLocations() |
boolean |
isFailOnError() |
void |
setAddLabelLocations(boolean addLabelLocations) |
void |
setDefaultLabel(String defaultLabel) |
void |
setFailOnError(boolean failOnError) |
void |
setOrder(int order) |
void |
setSearchLocations(String... locations) |
void |
setVersion(String version) |
public NativeEnvironmentRepository(org.springframework.core.env.ConfigurableEnvironment environment,
NativeEnvironmentProperties properties)
public boolean isFailOnError()
public void setFailOnError(boolean failOnError)
public boolean isAddLabelLocations()
public void setAddLabelLocations(boolean addLabelLocations)
public String getDefaultLabel()
public void setDefaultLabel(String defaultLabel)
public Environment findOne(String config, String profile, String label)
findOne in interface EnvironmentRepositorypublic Environment findOne(String config, String profile, String label, boolean includeOrigin)
findOne in interface EnvironmentRepositorypublic SearchPathLocator.Locations getLocations(String application, String profile, String label)
getLocations in interface SearchPathLocatorprotected Environment clean(Environment env)
protected Environment clean(Environment env, Map<org.springframework.core.env.PropertySource<?>,org.springframework.cloud.config.server.environment.NativeEnvironmentRepository.PropertySourceConfigData> propertySourceToConfigData)
public String[] getSearchLocations()
public void setSearchLocations(String... locations)
public String getVersion()
public void setVersion(String version)
public int getOrder()
getOrder in interface org.springframework.core.Orderedpublic void setOrder(int order)
Copyright © 2022 Pivotal Software, Inc.. All rights reserved.