@ConfigurationProperties(value="spring.cloud.config.server.native") public class NativeEnvironmentRepository extends Object implements EnvironmentRepository
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.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() |
String[] |
getSearchLocations() |
boolean |
isFailOnError() |
void |
setFailOnError(boolean failOnError) |
void |
setSearchLocations(String... locations) |
public NativeEnvironmentRepository(org.springframework.core.env.ConfigurableEnvironment environment)
public void setFailOnError(boolean failOnError)
public boolean isFailOnError()
public String getDefaultLabel()
getDefaultLabel
in interface EnvironmentRepository
public Environment findOne(String config, String profile, String label)
findOne
in interface EnvironmentRepository
protected Environment clean(Environment value)
public String[] getSearchLocations()
public void setSearchLocations(String... locations)
Copyright © 2015 Pivotal Software, Inc.. All rights reserved.