Class DatasourceFactory
java.lang.Object
io.micronaut.configuration.jdbc.dbcp.DatasourceFactory
Creates a dbcp data source for each configuration bean.
- Since:
- 1.0
- Author:
- Christian Oestreich
-
Constructor Summary
ConstructorDescriptionDatasourceFactory
(@Nullable DataSourceResolver dataSourceResolver) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionDataSourcePoolMetadata<org.apache.commons.dbcp2.BasicDataSource>
dbcpDataSourcePoolMetadata
(DataSource dataSource) Method to create a metadata object that allows pool value lookup for each datasource object.
-
Constructor Details
-
DatasourceFactory
Default constructor.- Parameters:
dataSourceResolver
- The data source resolver
-
-
Method Details
-
dbcpDataSourcePoolMetadata
@EachBean(javax.sql.DataSource.class) public DataSourcePoolMetadata<org.apache.commons.dbcp2.BasicDataSource> dbcpDataSourcePoolMetadata(DataSource dataSource) Method to create a metadata object that allows pool value lookup for each datasource object.- Parameters:
dataSource
- The actual datasource- Returns:
- a
DataSourcePoolMetadata
-