Class HikariDataSourceResolver
java.lang.Object
io.micronaut.crac.resources.datasources.resolver.HikariDataSourceResolver
- All Implemented Interfaces:
io.micronaut.core.order.Ordered
,DataSourceResourceResolver
@Singleton
@Requires(classes=com.zaxxer.hikari.HikariDataSource.class,
missing=io.micronaut.data.connection.jdbc.advice.DelegatingDataSource.class)
public class HikariDataSourceResolver
extends Object
implements DataSourceResourceResolver
If the data Source is of type
DelegatingDataSource
, extract the underlying data source.- Since:
- 1.2.0
- Author:
- Sergio del Amo
-
Field Summary
Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
getOrder()
@NonNull Optional<org.crac.Resource>
resolve
(@NonNull DataSource dataSource, @NonNull CracConfiguration configuration)
-
Constructor Details
-
HikariDataSourceResolver
public HikariDataSourceResolver()
-
-
Method Details
-
resolve
@NonNull public @NonNull Optional<org.crac.Resource> resolve(@NonNull @NonNull DataSource dataSource, @NonNull @NonNull CracConfiguration configuration) - Specified by:
resolve
in interfaceDataSourceResourceResolver
-
getOrder
public int getOrder()- Specified by:
getOrder
in interfaceio.micronaut.core.order.Ordered
-