Java 找不到Spring Boot Mongo反应类-找不到类[org.springframework.data.mongodb.MongoDatabaseFactory]
之前在SpringBoot2.2.7中使用MongoDB reactive时,项目运行良好 xml提取Java 找不到Spring Boot Mongo反应类-找不到类[org.springframework.data.mongodb.MongoDatabaseFactory],java,spring,mongodb,spring-boot,reactive-programming,Java,Spring,Mongodb,Spring Boot,Reactive Programming,之前在SpringBoot2.2.7中使用MongoDB reactive时,项目运行良好 xml提取 <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.3.2.RELEASE</version> &l
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.2.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<dependencies>
...
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb-reactive</artifactId>
</dependency>
...
</dependencies>
最近有没有更大的变化
它仍在使用2.2.7和2.2.9,但2.3.x给出了运行时问题,因为找不到类
更改了哪些依赖项?很难弄清楚,任何帮助都将不胜感激
尝试了所有mvn清洁安装、intellij的清洁缓存等,请使用下面最新版本的依赖项之一。这为我解决了问题
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-mongodb</artifactId>
<version>3.0.3.RELEASE</version>
</dependency>
编辑:如果需要也可以
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-releasetrain</artifactId>
<version>Lovelace-SR9</version>
<type>pom</type>
<scope>import</scope>
</dependency>
您需要发布所有pom.xml,以了解发生了什么变化。其他内容均未发生变化。。仅版本2.3.2.Release甚至代码都没有更改您尝试了哪些内容。。?您是否运行了mvn clean install?尝试了所有操作,mvn clean install,intellij的clean cache,等等
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-releasetrain</artifactId>
<version>Lovelace-SR9</version>
<type>pom</type>
<scope>import</scope>
</dependency>