java – 名为’org.springframework.boot.autoconfigure.internalCachingMetadataReaderFactory’的bean上的Destroy方法引发异常

我一直试图通过在线提示解决这个“破坏方法异常”,但没有成功.这是错误消息:

2017-10-16 15:58:13.234 ERROR 12276 — [ main] o.s.b.f.s.DefaultListableBeanFactory : Destroy method on bean with name ‘org.springframework.boot.autoconfigure.internalCachingMetadataReaderFactory’ threw an exception

这是我的POM.xml依赖项:

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-actuator</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-aws</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-aws-jdbc</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <version>1.16.6</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-jpa</artifactId>
    </dependency>
</dependencies>

从在线看来,问题出在spring-boot-starter-data-jpa依赖项上.我尝试了旧版本的依赖性,并清理mvn但它们都不起作用.

更新

从spring initializr重新生成pom之后,我仍然遇到了同样的错误.这是我的pom.xml依赖项:

    <dependencies>
<!--need this aws dependency for some packages-->
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-aws</artifactId>
        </dependency>
<!--need this aws dependency for some packages-->
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-aws-jdbc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.16.6</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
    </dependencies>

有什么建议?

最佳答案 这里有很多重复的罐子..

我会去here生成一个具有所需依赖项的spring项目.

点赞