diff --git a/buildSrc/src/main/groovy/io.micronaut.build.internal.crac-module.gradle b/buildSrc/src/main/groovy/io.micronaut.build.internal.crac-module.gradle index 7db4da42..ce0ab239 100644 --- a/buildSrc/src/main/groovy/io.micronaut.build.internal.crac-module.gradle +++ b/buildSrc/src/main/groovy/io.micronaut.build.internal.crac-module.gradle @@ -6,9 +6,10 @@ dependencies { api(libs.managed.crac) compileOnly(mn.micronaut.http.server.netty) compileOnly(mnSql.micronaut.jdbc.hikari) - compileOnly(mnData.micronaut.data.tx) + compileOnly(mnData.micronaut.data.connection.jdbc) compileOnly(mnRedis.micronaut.redis.lettuce) + testImplementation(mnData.micronaut.data.connection.jdbc) testImplementation(mnData.micronaut.data.tx) testImplementation(mnSql.micronaut.jdbc.hikari) testImplementation(mnSerde.micronaut.serde.jackson) diff --git a/crac/src/main/java/io/micronaut/crac/resources/datasources/resolver/HikariDataSourceResolver.java b/crac/src/main/java/io/micronaut/crac/resources/datasources/resolver/HikariDataSourceResolver.java index 58120a86..9c020080 100644 --- a/crac/src/main/java/io/micronaut/crac/resources/datasources/resolver/HikariDataSourceResolver.java +++ b/crac/src/main/java/io/micronaut/crac/resources/datasources/resolver/HikariDataSourceResolver.java @@ -21,7 +21,7 @@ import io.micronaut.core.annotation.NonNull; import io.micronaut.crac.CracConfiguration; import io.micronaut.crac.resources.datasources.HikariDataSourceResource; -import io.micronaut.transaction.jdbc.DelegatingDataSource; +import io.micronaut.data.connection.jdbc.advice.DelegatingDataSource; import jakarta.inject.Singleton; import org.crac.Resource; import org.slf4j.Logger; diff --git a/crac/src/main/java/io/micronaut/crac/resources/datasources/resolver/HikariDelegatingDataSourceResolver.java b/crac/src/main/java/io/micronaut/crac/resources/datasources/resolver/HikariDelegatingDataSourceResolver.java index b447ee68..f1fc92e4 100644 --- a/crac/src/main/java/io/micronaut/crac/resources/datasources/resolver/HikariDelegatingDataSourceResolver.java +++ b/crac/src/main/java/io/micronaut/crac/resources/datasources/resolver/HikariDelegatingDataSourceResolver.java @@ -20,7 +20,7 @@ import io.micronaut.core.annotation.Experimental; import io.micronaut.core.annotation.NonNull; import io.micronaut.crac.CracConfiguration; -import io.micronaut.transaction.jdbc.DelegatingDataSource; +import io.micronaut.data.connection.jdbc.advice.DelegatingDataSource; import jakarta.inject.Singleton; import org.crac.Resource; import org.slf4j.Logger; @@ -30,7 +30,7 @@ import java.util.Optional; /** - * If the data Source is of type {@link io.micronaut.transaction.jdbc.DelegatingDataSource}, extract the underlying data source. + * If the data Source is of type {@link io.micronaut.data.connection.jdbc.advice.DelegatingDataSource}, extract the underlying data source. * * @author Sergio del Amo * @since 1.2.0 diff --git a/crac/src/test/groovy/io/micronaut/crac/HikariSpec.groovy b/crac/src/test/groovy/io/micronaut/crac/HikariSpec.groovy index 2904e235..5566f17c 100644 --- a/crac/src/test/groovy/io/micronaut/crac/HikariSpec.groovy +++ b/crac/src/test/groovy/io/micronaut/crac/HikariSpec.groovy @@ -6,8 +6,8 @@ import groovy.sql.Sql import io.micronaut.context.BeanContext import io.micronaut.context.annotation.Property import io.micronaut.crac.test.CheckpointSimulator +import io.micronaut.data.connection.jdbc.advice.DelegatingDataSource import io.micronaut.test.extensions.spock.annotation.MicronautTest -import io.micronaut.transaction.jdbc.DelegatingDataSource import jakarta.inject.Inject import org.slf4j.LoggerFactory import spock.lang.AutoCleanup @@ -50,7 +50,7 @@ class HikariSpec extends Specification { hikariDataSource.running when: "we make sure we've got a connection warmed up" - def rows = new Sql(dataSource).rows("select 1") + def rows = new Sql(hikariDataSource).rows("select 1") then: rows.size() == 1 diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index db69c932..25856a2b 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -2,7 +2,7 @@ micronaut = "4.0.0-RC1" micronaut-cache = "4.0.0-M5" -micronaut-data = "4.0.0-M7" +micronaut-data = "4.0.0-M9" micronaut-docs = "2.0.0" micronaut-redis = "6.0.0-M5" micronaut-serialization = "2.0.0-M12"