search
HomeJavaCorrect application classpath so that it contains a single compatible version of org.springframework.beans.factory.config.ConfigurableListableBeanFactory

Question content

I receive the following error Application cannot start

describe:

Attempt to call a method that does not exist. Try doing it from:

org.springframework.boot.actuate.autoconfigure.startup.startupendpointautoconfiguration$applicationstartupcondition.getmatchoutcome(startupendpointautoconfiguration.java:63)

The following methods do not exist:

org.springframework.beans.factory.config.configurablelistablebeanfactory.getapplicationstartup()lorg/springframework/core/metrics/applicationstartup;

The class org.springframework.beans.factory.config.configurablelistablebeanfactory for this method can be obtained from the following location: jar: file: /users/doc/.m2/repository/org/springframework/spring-beans/5.2.5.release/spring-beans-5.2.5.release.jar! /org/springframework/beans/factory/config /configurablelistablebeanfactory.class

It is loaded from:

file:/users/doc/.m2/repository/org/springframework/spring-beans/5.2.5.release/spring-beans-5.2.5.release.jar

action:

Correct the application's classpath to include a single compatible version of org.springframework.beans.factory.config.configurablelistablebeanfactory

pom

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.2.6.RELEASE</version>

</parent>



<properties>
    <java.version>1.8</java.version>
 

   
    <!-- Spring Dependencies -->
    <spring-retry.version>1.3.1</spring-retry.version>
    <spring-cloud-netflix-core.version>1.1.7.RELEASE</spring-cloud-netflix-core.version>
    <spring-cloud-vault-config.version>3.1.1</spring-cloud-vault-config.version>
    <spring-vault-core.version>2.3.2</spring-vault-core.version>
 



    <!-- Swagger Dependencies -->
    <springfox-swagger2.version>2.4.0</springfox-swagger2.version>

   
</properties>
<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.retry</groupId>
            <artifactId>spring-retry</artifactId>
            <version>${spring-retry.version}</version>
        </dependency>
        
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-netflix-core</artifactId>
            <version>${spring-cloud-netflix-core.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-vault-config</artifactId>
            <version>${spring-cloud-vault-config.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.vault</groupId>
            <artifactId>spring-vault-core</artifactId>
            <version>${spring-vault-core.version}</version>
        </dependency>
        
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-dependencies</artifactId>
            <version>Hoxton.SR6</version>
        </dependency>
       
        
       
        <!-- Swagger Dependencies-->
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger2</artifactId>
            <version>${springfox-swagger2.version}</version>
        </dependency>
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger-ui</artifactId>
            <version>${springfox-swagger2.version}</version>
        </dependency>
        <!-- Testing dependencies -->
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-staticdocs</artifactId>
            <version>${springfox-swagger2.version}</version>
        </dependency>
    </dependencies>
</dependencyManagement>
<dependencies>
  
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-vault-config</artifactId>
        <version>${spring-cloud-vault-config.version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.vault</groupId>
        <artifactId>spring-vault-core</artifactId>
        <version>${spring-vault-core.version}</version>
    </dependency>
    
   
    <!-- Spring dependencies -->
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-actuator</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-actuator-autoconfigure</artifactId>
        <version>2.4.0</version>
    </dependency>
    <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <version>5.1.25</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-jpa</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-jdbc</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.retry</groupId>
        <artifactId>spring-retry</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-openfeign</artifactId>
        <version>2.0.1.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-netflix-ribbon</artifactId>
        <version>2.1.0.RELEASE</version>
    </dependency>

Correct answer


You are trying to go beyond spring boot and spring cloud dependency management and include a large number of incompatible versions. Simply add spring-cloud-dependency to the dependencymanagement section to simplify dependency management. Remove all others as they are already managed by spring boot or spring cloud dependencies you have.

Next remove the version from the dependencies in the dependencie section and remove the spring-boot-actuator-autoconfiguration dependency which is included in spring-boot -starter in.

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.2.13.RELEASE</version>
</parent>

<properties>
    <java.version>1.8</java.version>

    <!-- Swagger Dependencies -->
    <springfox-swagger2.version>2.4.0</springfox-swagger2.version>

   
</properties>
<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-dependencies</artifactId>
            <version>Hoxton.SR12</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
        <!-- Swagger Dependencies-->
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger2</artifactId>
            <version>${springfox-swagger2.version}</version>
        </dependency>
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger-ui</artifactId>
            <version>${springfox-swagger2.version}</version>
        </dependency>
        <!-- Testing dependencies -->
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-staticdocs</artifactId>
            <version>${springfox-swagger2.version}</version>
        </dependency>
    </dependencies>
</dependencyManagement>
<dependencies>
  
    <!-- Spring dependencies -->
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-actuator</artifactId>
    </dependency>
    <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-jpa</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-jdbc</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.retry</groupId>
        <artifactId>spring-retry</artifactId>
    </dependency>

    <!-- Spring Cloud Starter -->
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-openfeign</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-netflix-ribbon</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-vault-config</artifactId>
    </dependency>
   
</dependencies>

Dependencies are now properly managed by spring boot and spring cloud in compatible versions.

The above is the detailed content of Correct application classpath so that it contains a single compatible version of org.springframework.beans.factory.config.ConfigurableListableBeanFactory. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:stackoverflow. If there is any infringement, please contact admin@php.cn delete

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment