spring cloud eureka client 写法

spring:
  application:
    name: ${app:unicom-statistic}

  cloud:
    config:
      uri: http://${config-ip:192.168.0.110}:8500
      profile: ${profile:dev}
      label: master
  task:
    scheduling:
      pool:
        size: 5
  # 数据源
  datasource:
    username: ${db.username}
    password: ${db.password}
    type: com.zaxxer.hikari.HikariDataSource
    driver-class-name: com.mysql.cj.jdbc.NonRegisteringDriver
    url: jdbc:mysql://${db.host}/${db.name}?useSSL=false&serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=UTF-8
    hikari:
      minimum-idle: 1
      maximum-pool-size: 3
    tomcat:
      min-idle: 1
      max-active: 3
mybatis:
  mapper-locations: classpath*:cloud/cjy/travel/module/**/permenentPeopleDao/*.xml,classpath*:cloud/cjy/travel/**/permenentPeopleDao/*.xml,classpath*:cloud/cjy/travel/module/common/**/permenentPeopleDao/*.xml


# eureka 配置
eureka:
  instance:
    # 一个 项目部署多个时, appname 应该一致, instance-id 不一致
    appname: unicom-statistic  
    # instance-id: ${spring.cloud.client.ip-address}:${server.port} 
    instance-id: ${spring.application.name}-${spring.cloud.client.ip-address}
  client:
    fetch-registry: true
    service-url:
      defaultZone: http://${eureka-server.user}:${eureka-server.password}@${eureka-server.host}/eureka/

# feign 超时 配置,不可修改
feign-timeout: 1800000 # 半小时
feign:
  client:
    default:
      #这里时间一定要调长,否则feign客户端会报ReadTimeOut  服务端报Error parsing HTTP request header
      connectTimeout: 60000
      readTimeout: ${feign-timeout}
      loggerLevel: basic
  httpclient:
    connection-timeout: 60000
ribbon:
  ReadTimeout: ${feign-timeout}
  ConnectTimeout: 60000
原文地址:https://www.cnblogs.com/whm-blog/p/11206358.html