@EachProperty(value="datasources", primary="default") public class DatasourceConfiguration extends com.zaxxer.hikari.HikariConfig implements BasicJdbcConfiguration
HikariConfig
are available to be configured.
If the url, driver class, username, or password are missing, sensible defaults
will be provided when possible. If no configuration beyond the datasource name
is provided, an in memory datastore will be configured based on the available
drivers on the classpath.PREFIX
Constructor and Description |
---|
DatasourceConfiguration(java.lang.String name)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getConfiguredDriverClassName() |
java.lang.String |
getConfiguredPassword() |
java.lang.String |
getConfiguredUrl() |
java.lang.String |
getConfiguredUsername() |
java.lang.String |
getConfiguredValidationQuery() |
java.lang.String |
getDriverClassName() |
java.lang.String |
getJndiName()
Get Jndi name.
|
java.lang.String |
getName() |
java.lang.String |
getPassword() |
java.lang.String |
getUrl() |
java.lang.String |
getUsername() |
java.lang.String |
getValidationQuery() |
void |
setDataSourceProperties(java.util.Map<java.lang.String,?> dsProperties)
Sets the data source properties.
|
void |
setDataSourceProperties(java.util.Properties dsProperties)
Deprecated.
Use
setDataSourceProperties(Map) instead |
void |
setJndiName(java.lang.String jndiName)
Setter.
|
void |
setUrl(java.lang.String url)
Setter.
|
void |
setValidationQuery(java.lang.String validationQuery)
Setter.
|
addDataSourceProperty, addHealthCheckProperty, copyStateTo, getCatalog, getConnectionInitSql, getConnectionTestQuery, getConnectionTimeout, getDataSource, getDataSourceClassName, getDataSourceJNDI, getDataSourceProperties, getExceptionOverrideClassName, getHealthCheckProperties, getHealthCheckRegistry, getIdleTimeout, getInitializationFailTimeout, getJdbcUrl, getLeakDetectionThreshold, getMaximumPoolSize, getMaxLifetime, getMetricRegistry, getMetricsTrackerFactory, getMinimumIdle, getPoolName, getScheduledExecutor, getSchema, getThreadFactory, getTransactionIsolation, getValidationTimeout, isAllowPoolSuspension, isAutoCommit, isIsolateInternalQueries, isReadOnly, isRegisterMbeans, setAllowPoolSuspension, setAutoCommit, setCatalog, setConnectionInitSql, setConnectionTestQuery, setConnectionTimeout, setDataSource, setDataSourceClassName, setDataSourceJNDI, setDriverClassName, setExceptionOverrideClassName, setHealthCheckProperties, setHealthCheckRegistry, setIdleTimeout, setInitializationFailTimeout, setIsolateInternalQueries, setJdbcUrl, setLeakDetectionThreshold, setMaximumPoolSize, setMaxLifetime, setMetricRegistry, setMetricsTrackerFactory, setMinimumIdle, setPassword, setPoolName, setReadOnly, setRegisterMbeans, setScheduledExecutor, setSchema, setThreadFactory, setTransactionIsolation, setUsername, setValidationTimeout, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setDriverClassName, setPassword, setUsername
public DatasourceConfiguration(@Parameter java.lang.String name)
name
- name that comes from propertiespublic java.lang.String getName()
getName
in interface BasicJdbcConfiguration
public java.lang.String getConfiguredUrl()
getConfiguredUrl
in interface BasicJdbcConfiguration
public java.lang.String getUrl()
getUrl
in interface BasicJdbcConfiguration
public void setUrl(java.lang.String url)
setUrl
in interface BasicJdbcConfiguration
url
- url of connectionpublic java.lang.String getConfiguredDriverClassName()
getConfiguredDriverClassName
in interface BasicJdbcConfiguration
public java.lang.String getDriverClassName()
getDriverClassName
in interface BasicJdbcConfiguration
getDriverClassName
in class com.zaxxer.hikari.HikariConfig
public java.lang.String getConfiguredUsername()
getConfiguredUsername
in interface BasicJdbcConfiguration
public java.lang.String getUsername()
getUsername
in interface BasicJdbcConfiguration
getUsername
in class com.zaxxer.hikari.HikariConfig
public java.lang.String getConfiguredPassword()
getConfiguredPassword
in interface BasicJdbcConfiguration
public java.lang.String getPassword()
getPassword
in interface BasicJdbcConfiguration
getPassword
in class com.zaxxer.hikari.HikariConfig
public java.lang.String getConfiguredValidationQuery()
getConfiguredValidationQuery
in interface BasicJdbcConfiguration
public java.lang.String getValidationQuery()
getValidationQuery
in interface BasicJdbcConfiguration
public void setValidationQuery(java.lang.String validationQuery)
validationQuery
- string of querypublic java.lang.String getJndiName()
public void setJndiName(java.lang.String jndiName)
jndiName
- jndi namepublic void setDataSourceProperties(@MapFormat(transformation=FLAT,keyFormat=RAW) java.util.Map<java.lang.String,?> dsProperties)
setDataSourceProperties
in interface BasicJdbcConfiguration
dsProperties
- The datasource properties@Deprecated public void setDataSourceProperties(java.util.Properties dsProperties)
setDataSourceProperties(Map)
insteadsetDataSourceProperties
in class com.zaxxer.hikari.HikariConfig
dsProperties
- The data source properties