spring cloud config server

这是一个关于Eureka配置的示例,配置了server的端口为8020,使用了Spring Cloud Config,并指定了两个配置文件路径。此外,Eureka客户端设置为注册到Eureka服务器,每5秒更新注册信息,服务默认Zone为http://localhost:8010/eureka/,实例ID基于应用名、IP地址和服务器端口生成。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

server:
  port: 8020

spring:
  application:
    name: eureka-config
  cloud:
    config:
      server:
        native:
          search-locations:
            - file:///E:\hzq\2022\text\eureka-config\master\eureka-client
            - file:///E:\hzq\2022\text\eureka-config\master\eureka-client1
  profiles:
    active: native

eureka:
  client:
    register-with-eureka: true
    fetch-registry: true
    registry-fetch-interval-seconds: 5
    service-url:
      defaultZone: http://localhost:8010/eureka/
  instance:
    prefer-ip-address: true
    instance-id: ${spring.application.name}-${eureka.instance.ip-address}-${server.port}
    ip-address: 127.0.0.1
    lease-renewal-interval-in-seconds: 5

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值