@EachProperty(value="datasources",
primary="default")
public class DatasourceConfiguration
extends org.apache.tomcat.jdbc.pool.PoolProperties
implements io.micronaut.jdbc.BasicJdbcConfiguration
PoolProperties
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 datasource 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() |
String |
getPassword() |
String |
getUrl() |
String |
getUsername() |
String |
getValidationQuery() |
void |
setDbProperties(Properties dbProperties) |
void |
setJndiName(String jndiName) |
clone, getAbandonWhenPercentageFull, getCommitOnReturn, getConnectionProperties, getDataSource, getDataSourceJNDI, getDbProperties, getDefaultAutoCommit, getDefaultCatalog, getDefaultReadOnly, getDefaultTransactionIsolation, getInitialSize, getInitSQL, getJdbcInterceptors, getJdbcInterceptorsAsArray, getLogValidationErrors, getMaxActive, getMaxAge, getMaxIdle, getMaxWait, getMinEvictableIdleTimeMillis, getMinIdle, getName, getNumTestsPerEvictionRun, getPoolCounter, getPoolName, getPropagateInterruptState, getProperties, getRemoveAbandonedTimeout, getRollbackOnReturn, getSuspectTimeout, getTimeBetweenEvictionRunsMillis, getUseDisposableConnectionFacade, getUseLock, getUseStatementFacade, getValidationInterval, getValidationQueryTimeout, getValidator, getValidatorClassName, isAccessToUnderlyingConnectionAllowed, isAlternateUsernameAllowed, isDefaultAutoCommit, isDefaultReadOnly, isFairQueue, isIgnoreExceptionOnPreLoad, isJmxEnabled, isLogAbandoned, isPoolSweeperEnabled, isRemoveAbandoned, isTestOnBorrow, isTestOnConnect, isTestOnReturn, isTestWhileIdle, isUseEquals, setAbandonWhenPercentageFull, setAccessToUnderlyingConnectionAllowed, setAlternateUsernameAllowed, setCommitOnReturn, setConnectionProperties, setDataSource, setDataSourceJNDI, setDefaultAutoCommit, setDefaultCatalog, setDefaultReadOnly, setDefaultTransactionIsolation, setDriverClassName, setFairQueue, setIgnoreExceptionOnPreLoad, setInitialSize, setInitSQL, setJdbcInterceptors, setJmxEnabled, setLogAbandoned, setLogValidationErrors, setMaxActive, setMaxAge, setMaxIdle, setMaxWait, setMinEvictableIdleTimeMillis, setMinIdle, setName, setNumTestsPerEvictionRun, setPassword, setPropagateInterruptState, setRemoveAbandoned, setRemoveAbandonedTimeout, setRollbackOnReturn, setSuspectTimeout, setTestOnBorrow, setTestOnConnect, setTestOnReturn, setTestWhileIdle, setTimeBetweenEvictionRunsMillis, setUrl, setUseDisposableConnectionFacade, setUseEquals, setUseLock, setUsername, setUseStatementFacade, setValidationInterval, setValidationQuery, setValidationQueryTimeout, setValidator, setValidatorClassName, toString
public DatasourceConfiguration(@Parameter String name)
name
- name that comes from propertiespublic void setDbProperties(@MapFormat(keyFormat=UNDER_SCORE_SEPARATED) Properties dbProperties)
setDbProperties
in interface org.apache.tomcat.jdbc.pool.PoolConfiguration
setDbProperties
in class org.apache.tomcat.jdbc.pool.PoolProperties
public String getDriverClassName()
getDriverClassName
in interface io.micronaut.jdbc.BasicJdbcConfiguration
getDriverClassName
in interface org.apache.tomcat.jdbc.pool.PoolConfiguration
getDriverClassName
in class org.apache.tomcat.jdbc.pool.PoolProperties
public String getConfiguredDriverClassName()
getConfiguredDriverClassName
in interface io.micronaut.jdbc.BasicJdbcConfiguration
public String getUrl()
getUrl
in interface io.micronaut.jdbc.BasicJdbcConfiguration
getUrl
in interface org.apache.tomcat.jdbc.pool.PoolConfiguration
getUrl
in class org.apache.tomcat.jdbc.pool.PoolProperties
public String getConfiguredUrl()
getConfiguredUrl
in interface io.micronaut.jdbc.BasicJdbcConfiguration
public String getUsername()
getUsername
in interface io.micronaut.jdbc.BasicJdbcConfiguration
getUsername
in interface org.apache.tomcat.jdbc.pool.PoolConfiguration
getUsername
in class org.apache.tomcat.jdbc.pool.PoolProperties
public String getConfiguredUsername()
getConfiguredUsername
in interface io.micronaut.jdbc.BasicJdbcConfiguration
public String getPassword()
getPassword
in interface io.micronaut.jdbc.BasicJdbcConfiguration
getPassword
in interface org.apache.tomcat.jdbc.pool.PoolConfiguration
getPassword
in class org.apache.tomcat.jdbc.pool.PoolProperties
public String getConfiguredPassword()
getConfiguredPassword
in interface io.micronaut.jdbc.BasicJdbcConfiguration
public String getValidationQuery()
getValidationQuery
in interface io.micronaut.jdbc.BasicJdbcConfiguration
getValidationQuery
in interface org.apache.tomcat.jdbc.pool.PoolConfiguration
getValidationQuery
in class org.apache.tomcat.jdbc.pool.PoolProperties
public String getConfiguredValidationQuery()
getConfiguredValidationQuery
in interface io.micronaut.jdbc.BasicJdbcConfiguration
public String getJndiName()
public void setJndiName(String jndiName)
jndiName
- Set the JDNI name