zoukankan      html  css  js  c++  java
  • 1.springcloud-eureka启动报错,提示The following method did not exist: org.springframework.boot.actuate.health.CompositeHealthIndicato

    详细错误:

    ***************************
    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/zhao/.m2/repository/org/springframework/boot/spring-boot-actuator/2.2.0.M1/spring-boot-actuator-2.2.0.M1.jar!/org/springframework/boot/actuate/health/CompositeHealthIndicator.class
    
    It was loaded from the following location:
    
        file:/C:/Users/zhao/.m2/repository/org/springframework/boot/spring-boot-actuator/2.2.0.M1/spring-boot-actuator-2.2.0.M1.jar
    
    
    Action:
    
    Correct the classpath of your application so that it contains a single, compatible version of org.springframework.boot.actuate.health.CompositeHealthIndicator
    

    这个问题是springboot  和 springcloud   版本号不一致的问题

    比如我的(我的是错误的)就是:

    SpringBoot 2.2.4.RELEASE

    SpringCloud Greenwich.SR1

    解决方法

    解决方法有如下两种,我都已经测试过,这两种方法都可以解决问题

      1. 降级 SpringBoot
        把 SpringBoot 从 2.2.4.RELEASE 降级成 2.1.4.RELEASE
      2. 升级 SpringCloud
        把 SpringCloud 从 Greenwich.SR1 升级成 Hoxton.SR1
  • 相关阅读:
    MySQL中char(36)被认为是GUID导致的BUG及解决方案
    Hadoop相关的考题
    算法题
    对于Java静态内部类的理解
    关于网站数据分析
    static class 静态类(Java)转
    《深入浅出数据分析》读书笔记
    hive利器 自定义UDF+重编译hive
    使用kubectl实现Kubernetes容器与本地的文件双向复制
    Coolite Toolkit学习笔记二:服务器端Alert,Confirm,Prompt
  • 原文地址:https://www.cnblogs.com/shuai666/p/14714709.html
Copyright © 2011-2022 走看看