我建了两个server端分别设置运行端口8761和8762.配置文件如下
8761端口server:
server:
port: 8761
spring:
application:
name: eureka
eureka:
client:
service-url:
defaultZone: http://localhost:8762/eureka/
register-with-eureka: false
##开发环境设置为false 生产环境设置为true
server:
enable-self-preservation: false
management:
context-path: /
8762端口server:
server:
port: 8762
spring:
application:
name: eureka
eureka:
client:
service-url:
defaultZone: http://localhost:8761/eureka/
register-with-eureka: false
##开发环境设置为false 生产环境设置为true
server:
enable-self-preservation: false
management:
context-path: /
client配置:
spring:
application:
name: client
eureka:
client:
service-url:
defaultZone: http://localhost:8761/eureka/
为什么把这两个server和client运行起来后,http://localhost:8761/和http://localhost:8762/ 不能同步显示client啊?
我的版本用的是视频里的,问答区里的问题我也看了但是没有解决方案。这个问题请老师解答下。
SpringCloud组件实现微服务,【已升级Finchley.Release】
了解课程