Spring boot 在Spring引导中找不到Couchbase配置

Spring boot 在Spring引导中找不到Couchbase配置,spring-boot,spring-data-jpa,couchbase,Spring Boot,Spring Data Jpa,Couchbase,我正在尝试创建一个简单的Spring启动应用程序。 当我运行应用程序时,它无法开始给出以下错误: Caused by: java.io.FileNotFoundException: class path resource [org/springframework/data/couchbase/config/AbstractCouchbaseDataConfiguration.class] cannot be opened because it does not exist 我没有使用Couch

我正在尝试创建一个简单的Spring启动应用程序。 当我运行应用程序时,它无法开始给出以下错误:

Caused by: java.io.FileNotFoundException: class path resource [org/springframework/data/couchbase/config/AbstractCouchbaseDataConfiguration.class] cannot be opened because it does not exist
我没有使用Couchbase,但它仍显示此错误。 我的pom.xml文件:

<dependencies>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-jpa</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

    <dependency>
        <groupId>com.h2database</groupId>
        <artifactId>h2</artifactId>
        <scope>runtime</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>
</dependencies>

org.springframework.boot
spring引导启动器数据jpa
org.springframework.boot
SpringBootStarterWeb
com.h2数据库
氢
运行时
org.springframework.boot
弹簧起动试验
测验

要开始使用Couchbase,您需要添加Spring Boot Starter依赖项:


org.springframework.boot
更多细节


注意:如果您不确定需要哪些依赖项,可以使用。

在测试阶段,我在一个个人项目中遇到了完全相同的错误。 我发现出现此消息是因为我错误地使用SpringBootApplication.class作为基本配置类创建了一个测试类,如下所示:

@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, classes = { SpringBootApplication.class })
public class ControllerTest {
...
它似乎开始扫描所有的自动配置模块,包括AbstractReactiveCouchbaseDataConfiguration。
刚刚删除了classes属性,错误消失,测试执行正常。

我不想使用couchbase。这就是为什么我没有把它包括在内。但它仍然向我展示了这个错误。你能找到它在项目中被引用的地方吗?从项目的根目录运行
grep-n-r“couchbase”。
请添加用于运行应用程序的命令。我正在通过eclipse本身运行它。您应该看到eclipse控制台中使用的确切命令。通过line命令运行“mvn clean install”,它应该修复您的依赖关系