@Factory
public class DatasourceFactory
extends java.lang.Object
implements java.lang.AutoCloseable
Constructor and Description |
---|
DatasourceFactory(io.micronaut.context.ApplicationContext applicationContext)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
oracle.ucp.jdbc.PoolDataSource |
dataSource(DatasourceConfiguration datasourceConfiguration)
Method to get a PoolDataSource from the
DatasourceConfiguration . |
public DatasourceFactory(io.micronaut.context.ApplicationContext applicationContext)
applicationContext
- The application context@Context @EachBean(value=DatasourceConfiguration.class) public oracle.ucp.jdbc.PoolDataSource dataSource(DatasourceConfiguration datasourceConfiguration)
DatasourceConfiguration
.datasourceConfiguration
- A DatasourceConfiguration
PoolDataSource
@PreDestroy public void close()
close
in interface java.lang.AutoCloseable