zoukankan      html  css  js  c++  java
  • 整合zuul启动时报错Correct the classpath of your application so that it contains a single, compatible version of XXX

    今天集成zuul与consul的时候,出现如下错误

    ***************************
    APPLICATION FAILED TO START
    ***************************

    Description:

    An attempt was made to call a method that does not exist. The attempt was made from the following location:

    org.springframework.cloud.client.discovery.health.DiscoveryCompositeHealthIndicator.<init>(DiscoveryCompositeHealthIndicator.java:42)

    The following method did not exist:

    org.springframework.boot.actuate.health.CompositeHealthIndicator.<init>(Lorg/springframework/boot/actuate/health/HealthAggregator;)V

    The method's class, org.springframework.boot.actuate.health.CompositeHealthIndicator, is available from the following locations:

    jar:file:/C:/Users/Administrator/.m2/repository/org/springframework/boot/spring-boot-actuator/2.2.1.RELEASE/spring-boot-actuator-2.2.1.RELEASE.jar!/org/springframework/boot/actuate/health/CompositeHealthIndicator.class

    It was loaded from the following location:

    file:/C:/Users/Administrator/.m2/repository/org/springframework/boot/spring-boot-actuator/2.2.1.RELEASE/spring-boot-actuator-2.2.1.RELEASE.jar


    Action:

    Correct the classpath of your application so that it contains a single, compatible version of org.springframework.boot.actuate.health.CompositeHealthIndicator

    原因:

      springcloud与springboot的版本上存在存问题

      版本对应可以在https://spring.io/projects/spring-cloud上查看

    将spring boot版本换成2.1.8.RELEASE

    启动正常

  • 相关阅读:
    1.5 判断是奇数还是偶数(比较运算符 & if...else)
    1.4计算器 (数字类型 & 算术运算符 &赋值运算符)
    1.3hello 张三(终端交互 & 字符串)
    1.2python语言环境 & python IDE(集成开发环境)搭建
    Centos 7 下安装jdk 7
    Centos 7 安装redis
    git 学习笔记
    git 基础操作
    git 获取远程分支的代码
    redis基础操作
  • 原文地址:https://www.cnblogs.com/baby123/p/11907483.html
Copyright © 2011-2022 走看看