错误原因:将服务注册到Eureka中心时,配置文件中写法,在两个Eureka地址之间加了空格,导致报错URL中含有不合法的字符

错误写法:

# 注册到Eureka中
eureka:
  instance:
    instance-id: springcloud-zuul-config-5001
  client:
    service-url:
      defaultZone: http://localhost:7000/eureka/ , http://feiyu:7001/eureka/

正确写法:

# 注册到Eureka中
eureka:
  instance:
    instance-id: springcloud-zuul-config-5001
  client:
    service-url:
      defaultZone: http://localhost:7000/eureka/,http://feiyu:7001/eureka/
Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐