Here are my pom.xml
dependencies generated from https://start.spring.io
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb-reactive</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-test</artifactId>
<scope>test</scope>
</dependency>
To reproduce this issue, just @Autowire MongoOperations ops
. This configuration works with 2.2.6.RELEASE
without any issues.
The error is:
Consider defining a bean of type 'org.springframework.data.mongodb.core.MongoOperations' in your configuration.
Comment From: snicoll
MongoOperations
is the imperative (non reactive) variant. The new MongoDB driver has harmonized their infrastructure with a clear split so that is expected. If you need the imperative variant, you need to add spring-boot-starter-data-mongodb
.
I've polished the release notes to reflect that information.