T
- the DataSource type@FunctionalInterface public interface DataSourceFactory<T extends DataSource>
DataSource
objects.
This interface exposes the newDataSource()
method, which inits the DataSource.
Knowing this, implementations must call newDataSource()
when it's all set.
This interface can be used to create any datasource which supports a property-based configuration.
DataSource
,
HikariFactory
Modifier and Type | Field and Description |
---|---|
static String |
TEMPLATE_URL
Represents a basic template url for creating a jdbc url.
|
Modifier and Type | Method and Description |
---|---|
T |
newDataSource()
If ready, a new DataSource is created with its configuration.
|
static final String TEMPLATE_URL
jdbc:<dbms-name>://<host>:<port>/<schema>
@NotNull T newDataSource() throws DataSourceInitException
DataSourceInitException
- if something went wrong. SQLException
. Copyright © 2021. All rights reserved.