public class DatabaseConnectionRegistry extends Object
| Constructor and Description |
|---|
DatabaseConnectionRegistry() |
DatabaseConnectionRegistry(DbUriExtractor uriExtractor,
Map<String,DatabaseCredentials> providedCredentials)
Pre-populates registry with credentials associated with URI prefixes, so that one
can use this registry to obtain connections using URI's without user information.
|
DatabaseConnectionRegistry(Map<String,DatabaseCredentials> providedCredentials) |
| Modifier and Type | Method and Description |
|---|---|
protected org.springframework.jdbc.core.support.JdbcDaoSupport |
acquireDaoSupport(AbsoluteLocation location,
DatabaseCredentials credentials)
Open `database connection`
|
protected DatabaseCredentials |
getCredentials(AbsoluteLocation location)
Extracts credentials from path URI or uses
providedCredentials to get them |
org.springframework.jdbc.core.JdbcTemplate |
jdbcTemplate(AbsoluteLocation location)
Acquire JDBC template for some resource location
|
protected void |
updateDbSchema(DataSource dataSource)
Migrates specified data source using liquibase script at changelog/changelog.xml
|
public DatabaseConnectionRegistry()
public DatabaseConnectionRegistry(Map<String,DatabaseCredentials> providedCredentials)
public DatabaseConnectionRegistry(DbUriExtractor uriExtractor, Map<String,DatabaseCredentials> providedCredentials)
providedCredentials - Prefix-based matcher for db URI - connection credentialspublic org.springframework.jdbc.core.JdbcTemplate jdbcTemplate(AbsoluteLocation location)
location - Resource location that has credentials to access database.protected void updateDbSchema(DataSource dataSource)
dataSource - DataSource to migrateprotected org.springframework.jdbc.core.support.JdbcDaoSupport acquireDaoSupport(AbsoluteLocation location, DatabaseCredentials credentials)
location - Location with credentials to open connection forprotected DatabaseCredentials getCredentials(AbsoluteLocation location)
providedCredentials to get themlocation - URI to get credentials for.Copyright © 2020. All rights reserved.