client:application.yml文件
eureka:
client:
serviceUrl:
defaultZone: http://localhost:8761/eureka/
instance:
#使用ip
prefer-ip-address: true
#注册中心显示的实例
instance-id: zhaofengdeng2
#使用的ip地址
ip-address: ${spring.application.ipAddress}
server:
#端口
port: 8763
spring:
application:
name: eureka-client
ipAddress: 192.168.1.201
问题:多个spring cloud部署到一个服务器时,项目启动失败
application.properties文件
spring.jmx.default-domain=projectName
或者
application.yml文件
spring:
jmx:
defaultDomain: projectName