Spring Boot 3 Support for mongodb-reactive-driver
XSpielinbox opened this issue · comments
Description
When trying to use Mongock 5.2.x in a Spring Boot 3.0.x Application with Spring Webflux and the Mongock MongoDB Reactive Driver with the Autoconfiguration, it does not find the ConnectionDriver Bean.
PRIORITY
NORMAL
Version and environment
Mongock
- tested with 5.2.2 as well as 5.2.4
- mongock-springboot-v3 as well as mongock-springboot and mongodb-reactive-driver
- annotation approach
Environment
- Spring Boot 3.0.4 (spring-boot-starter-webflux & spring-boot-starter-data-mongodb-reactive)
- Infrastructure: standalone
Steps to Reproduce
- Start the application
Behaviour
Expected behavior: The Autoconfiguration figures out everything automatically or every additionally needed step is clearly documented
Actual behavior: it fails and it is extremely difficult to figure out why
How often the bug happens: 100%
Link to repository using Mongock
If needed, I can add it later.
Additional context
It took me a long time to find #589, which is the only place where I could find anything that mongock-springboot-v3 is needed, though it wasn't clear to me, whether it was still current, as it was lacking behind one patch-version behind mongock-springboot and the other packages and I could not find any changelog or documentation.
It also took me a long time to find some words about the ConnectionDriver bean in #591, which is the only place where I could find that this is needed or how one could/should implement one. When using this implementation, it works.
When using the Builder approach instead of the annotation everything works - even with mongock-springboot.
Hello @XSpielinbox , Mongock is compatible with Springboot v3, but at the moment only in combination with SpringData v4 Driver. Please take a look to this sample project:
Springboot v3 + Springdata v4 - Sample Project (JDK17)
Hope it helps you.
yes, I looked at that sample project. As we have a reactive Application use of the reactive driver is necessary, however.
Is there any timeline on when Spring Boot v3 will also be supported for the reactive Driver?
need one
Hello @povisenko / @XSpielinbox . Mongock currently supports SpringBoot v3 in combination with reactive Driver, but you need to use Mongock with de builder
approach (instead of auto-configuration with @EnableMongock
).
We added a new sample project to show how it works. Please take a look at the following link:
Springboot v3 + MongoDB Reactive - Sample Project (JDK17)
Hope it helps you.