@ConfigurationProperties(value="spring.cloud.config.server.native") 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) |
| Modifier and Type | Method and Description |
|---|---|
protected Environment |
clean(Environment value) |
Environment |
findOne(String config,
String profile,
String label) |
String |
getDefaultLabel() |
SearchPathLocator.Locations |
getLocations(String application,
String profile,
String label) |
int |
getOrder() |
String[] |
getSearchLocations() |
String |
getVersion() |
boolean |
isFailOnError() |
void |
setFailOnError(boolean failOnError) |
void |
setOrder(int order) |
void |
setSearchLocations(String... locations) |
void |
setVersion(String version) |
public NativeEnvironmentRepository(org.springframework.core.env.ConfigurableEnvironment environment)
public void setFailOnError(boolean failOnError)
public boolean isFailOnError()
public String getDefaultLabel()
public Environment findOne(String config, String profile, String label)
findOne in interface EnvironmentRepositorypublic SearchPathLocator.Locations getLocations(String application, String profile, String label)
getLocations in interface SearchPathLocatorprotected Environment clean(Environment value)
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 © 2017 Pivotal Software, Inc.. All rights reserved.