@EachProperty(value="datasources",
primary="default")
public class DatasourceConfiguration
extends com.zaxxer.hikari.HikariConfig
implements io.micronaut.jdbc.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.Constructor and Description |
---|
DatasourceConfiguration(String name)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
getConfiguredDriverClassName() |
String |
getConfiguredPassword() |
String |
getConfiguredUrl() |
String |
getConfiguredUsername() |
String |
getConfiguredValidationQuery() |
String |
getDriverClassName() |
String |
getJndiName()
Get Jndi name.
|
String |
getName() |
String |
getPassword() |
String |
getUrl() |
String |
getUsername() |
String |
getValidationQuery() |
void |
setJndiName(String jndiName)
Setter.
|
void |
setUrl(String url)
Setter.
|
void |
setValidationQuery(String validationQuery)
Setter.
|
addDataSourceProperty, addHealthCheckProperty, copyStateTo, getCatalog, getConnectionInitSql, getConnectionTestQuery, getConnectionTimeout, getDataSource, getDataSourceClassName, getDataSourceJNDI, getDataSourceProperties, 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, setDataSourceProperties, setDriverClassName, setHealthCheckProperties, setHealthCheckRegistry, setIdleTimeout, setInitializationFailTimeout, setIsolateInternalQueries, setJdbcUrl, setLeakDetectionThreshold, setMaximumPoolSize, setMaxLifetime, setMetricRegistry, setMetricsTrackerFactory, setMinimumIdle, setPassword, setPoolName, setReadOnly, setRegisterMbeans, setScheduledExecutor, setSchema, setThreadFactory, setTransactionIsolation, setUsername, setValidationTimeout, validate
public DatasourceConfiguration(@Parameter String name)
name
- name that comes from propertiespublic String getName()
getName
in interface io.micronaut.jdbc.BasicJdbcConfiguration
public String getConfiguredUrl()
getConfiguredUrl
in interface io.micronaut.jdbc.BasicJdbcConfiguration
public String getUrl()
getUrl
in interface io.micronaut.jdbc.BasicJdbcConfiguration
public void setUrl(String url)
url
- url of connectionpublic String getConfiguredDriverClassName()
getConfiguredDriverClassName
in interface io.micronaut.jdbc.BasicJdbcConfiguration
public String getDriverClassName()
getDriverClassName
in interface io.micronaut.jdbc.BasicJdbcConfiguration
getDriverClassName
in class com.zaxxer.hikari.HikariConfig
public String getConfiguredUsername()
getConfiguredUsername
in interface io.micronaut.jdbc.BasicJdbcConfiguration
public String getUsername()
getUsername
in interface io.micronaut.jdbc.BasicJdbcConfiguration
getUsername
in class com.zaxxer.hikari.HikariConfig
public String getConfiguredPassword()
getConfiguredPassword
in interface io.micronaut.jdbc.BasicJdbcConfiguration
public String getPassword()
getPassword
in interface io.micronaut.jdbc.BasicJdbcConfiguration
getPassword
in class com.zaxxer.hikari.HikariConfig
public String getConfiguredValidationQuery()
getConfiguredValidationQuery
in interface io.micronaut.jdbc.BasicJdbcConfiguration
public String getValidationQuery()
getValidationQuery
in interface io.micronaut.jdbc.BasicJdbcConfiguration
public void setValidationQuery(String validationQuery)
validationQuery
- string of querypublic String getJndiName()
public void setJndiName(String jndiName)
jndiName
- jndi name