Hi! Thanks for this amazing project!
For our tests we use io.zonky.test:embedded-database-spring-test:2.7.1 which used to work like a charm with Spring Boot 3.5.9.
Maybe also worth mentioning that we use Flyway 11.20.2 and Kotlin.
We're trying to migrate our application to Spring Boot 4.0.5.
We use gradle, so we just have a testImplementation(io.zonky.test:embedded-database-spring-test:2.7.1) because we're using the default docker provider. Additionally we have implementation(org.postgresql:postgresql:42.7.8).
This is what OurSpringBootTest annotation looks like:
@Target(CLASS)
@Retention(RUNTIME)
@ExtendWith(TestcontainersTestExtension::class, RedisTestExtension::class, MinioTestExtension::class)
@SpringBootTest
@AutoConfigureEmbeddedDatabase(refresh = RefreshMode.BEFORE_EACH_TEST_METHOD)
annotation class OurSpringBootTest
After migrating to Spring Boot 4.0.5, we are facing a BeanCreationException:
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'embeddedPostgresDatabaseProvider' defined in class path resource [io/zonky/test/db/config/EmbeddedDatabaseAutoConfiguration.class]: Failed to instantiate [io.zonky.test.db.provider.DatabaseProvider]: Factory method 'embeddedPostgresDatabaseProvider' threw exception with message: You have to add the following dependency to your project: 'io.zonky.test:embedded-postgres' (https://mvnrepository.com/artifact/io.zonky.test/embedded-postgres)
When I add this dependency, it wants to add dependencies for every possible provider and database type as defined in EmbeddedDatabaseAutoConfiguration. Somehow Spring changed the way it loads beans I guess.
But people already have embedded-database-spring-test running in Spring Boot 4 so I'm confused. Any hints or pointers what we might do wrong?
Thanks for your time and effort, it is greatly appreciated!
Hi! Thanks for this amazing project!
For our tests we use io.zonky.test:embedded-database-spring-test:2.7.1 which used to work like a charm with Spring Boot 3.5.9.
Maybe also worth mentioning that we use Flyway 11.20.2 and Kotlin.
We're trying to migrate our application to Spring Boot 4.0.5.
We use gradle, so we just have a
testImplementation(io.zonky.test:embedded-database-spring-test:2.7.1)because we're using the default docker provider. Additionally we haveimplementation(org.postgresql:postgresql:42.7.8).This is what
OurSpringBootTestannotation looks like:After migrating to Spring Boot 4.0.5, we are facing a
BeanCreationException:When I add this dependency, it wants to add dependencies for every possible provider and database type as defined in
EmbeddedDatabaseAutoConfiguration. Somehow Spring changed the way it loads beans I guess.But people already have embedded-database-spring-test running in Spring Boot 4 so I'm confused. Any hints or pointers what we might do wrong?
Thanks for your time and effort, it is greatly appreciated!