Class JdbcEnvironmentRepository
java.lang.Object
org.springframework.cloud.config.server.environment.JdbcEnvironmentRepository
- All Implemented Interfaces:
EnvironmentRepository, org.springframework.core.Ordered
public class JdbcEnvironmentRepository
extends Object
implements EnvironmentRepository, org.springframework.core.Ordered
An
EnvironmentRepository that picks up data from a relational database. The
database should have a table called "PROPERTIES" with columns "APPLICATION", "PROFILE",
"LABEL" (with the usual Environment meaning), plus "KEY" and "VALUE" for the
key and value pairs in Properties style. Property values behave in the same way
as they would if they came from Spring Boot properties files named
{application}-{profile}.properties, including all the encryption and
decryption, which will be applied as post-processing steps (i.e. not in this repository
directly).- Author:
- Dave Syer
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionJdbcEnvironmentRepository(org.springframework.jdbc.core.JdbcTemplate jdbc, JdbcEnvironmentProperties properties, JdbcEnvironmentRepository.PropertiesResultSetExtractor extractor) -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface EnvironmentRepository
findOne
-
Constructor Details
-
JdbcEnvironmentRepository
public JdbcEnvironmentRepository(org.springframework.jdbc.core.JdbcTemplate jdbc, JdbcEnvironmentProperties properties, JdbcEnvironmentRepository.PropertiesResultSetExtractor extractor)
-
-
Method Details
-
getSql
-
setSql
-
findOne
public org.springframework.cloud.config.environment.Environment findOne(String application, String profile, String label) - Specified by:
findOnein interfaceEnvironmentRepository
-
getOrder
public int getOrder()- Specified by:
getOrderin interfaceorg.springframework.core.Ordered
-
setOrder
public void setOrder(int order) -
isFailOnError
public boolean isFailOnError() -
setFailOnError
public void setFailOnError(boolean failOnError)
-