SpringCloud的eureka报错:Cannot execute request on any known server

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接: https://blog.csdn.net/caoxuecheng001/article/details/102520350

1、检查服务注册地址是否正确

eureka:
  client:
    service-url:
      defaultZone: http://admin:admin@localhost:7001/eureka

2、用不到的包就别引入

   <!--<dependency>-->
            <!--<groupId>org.springframework.boot</groupId>-->
            <!--<artifactId>spring-boot-starter-security</artifactId>-->
        <!--</dependency>-->

我的是第二种情况。我把这个安全的jar包注释了就解决了。因为这个产品模块已经依赖了安全控制的模块,所以就不用再次依赖了。

猜你喜欢

转载自blog.csdn.net/caoxuecheng001/article/details/102520350
今日推荐