public class JdbcEnvironmentRepository extends Object implements EnvironmentRepository, org.springframework.core.Ordered
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).| Modifier and Type | Class and Description |
|---|---|
static class |
JdbcEnvironmentRepository.PropertiesResultSetExtractor |
| Constructor and Description |
|---|
JdbcEnvironmentRepository(org.springframework.jdbc.core.JdbcTemplate jdbc,
JdbcEnvironmentProperties properties)
Deprecated.
|
JdbcEnvironmentRepository(org.springframework.jdbc.core.JdbcTemplate jdbc,
JdbcEnvironmentProperties properties,
JdbcEnvironmentRepository.PropertiesResultSetExtractor extractor) |
| Modifier and Type | Method and Description |
|---|---|
Environment |
findOne(String application,
String profile,
String label) |
int |
getOrder() |
String |
getSql() |
boolean |
isFailOnError() |
void |
setFailOnError(boolean failOnError) |
void |
setOrder(int order) |
void |
setSql(String sql) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfindOne@Deprecated public JdbcEnvironmentRepository(org.springframework.jdbc.core.JdbcTemplate jdbc, JdbcEnvironmentProperties properties)
public JdbcEnvironmentRepository(org.springframework.jdbc.core.JdbcTemplate jdbc,
JdbcEnvironmentProperties properties,
JdbcEnvironmentRepository.PropertiesResultSetExtractor extractor)
public String getSql()
public void setSql(String sql)
public Environment findOne(String application, String profile, String label)
findOne in interface EnvironmentRepositorypublic int getOrder()
getOrder in interface org.springframework.core.Orderedpublic void setOrder(int order)
public boolean isFailOnError()
public void setFailOnError(boolean failOnError)
Copyright © 2022 Pivotal Software, Inc.. All rights reserved.