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 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 |
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 EnvironmentRepository
public SearchPathLocator.Locations getLocations(String application, String profile, String label)
getLocations
in interface SearchPathLocator
protected 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.Ordered
public void setOrder(int order)
Copyright © 2019 Pivotal Software, Inc.. All rights reserved.