Class HikariDelegatingDataSourceResolver
java.lang.Object
io.micronaut.crac.resources.datasources.resolver.HikariDelegatingDataSourceResolver
- All Implemented Interfaces:
io.micronaut.core.order.Ordered
,DataSourceResourceResolver
@Singleton
@Requires(classes={io.micronaut.data.connection.jdbc.advice.DelegatingDataSource.class,com.zaxxer.hikari.HikariDataSource.class})
public class HikariDelegatingDataSourceResolver
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
-
HikariDelegatingDataSourceResolver
public HikariDelegatingDataSourceResolver()
-
-
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
-