zoukankan      html  css  js  c++  java
  • SpringCloud项目之Eureka 配置 application.yml

    记下来供以后参考
    项目使用config集中管理其他配置
    其中eureka的配置为:
    application.yml


    spring:
    application:
    name: EurekaServer
    redis:
    database: 0
    pool:
    max-active: 8
    max-wait: -1
    max-idle: 8
    min-idle: 0
    maxIdle: 30
    maxTotal: 200
    timeBetweenEvictionRunsMillis: 30000
    minEvictableIdleTimeMillis: 30000
    testOnBorrow: true
    timeout: 1000
    password: 5tgb7ygv
    cluster.nodes: 10.....,10.1.....,1111,10.....
    cluster.max-redirects: 6


    server:
    port: 8761

    eureka:
    instance:
    hostname: 34.........120 #本机ip地址,可不配
    preferIpAddress: true
    instance-id; ${spring.cloud.client.ipAddress}:${server.port}
    environment: local #如果使用config 统一配置 environment也不需要
    client:
    registerWithEureka: false #表示是否注册自身到eureka服务器, 做集群是设置成true 生产配置为true
    fetchRegistry: false #表示是否从eureka服务器获得注册信息,生产配置为true
    registry-fetch-interval-seconds: 5 #默认为30s 生产使用缺省时间,测试环境修改小点
    lease-renewal-interval-in-seconds: 5 #心跳时间,生产使用缺省时间,即服务续约间隔时间(缺省为30秒,生产使用缺省时间,测试环境修改小点)
    lease-expiration-duration-in-seconds: 10 #发呆时间,即服务续约到期时间(缺省为90秒,生产使用缺省时间,测试环境修改小点)
    serviceUrl:
    defaultZone: http://localhost:8761/eureka
    server:
    enableSelfPreservation: true #关闭自我保护模式(缺省为打开)
    eviction-interval-timer-in-ms: 5000 #续期时间,即扫描失效服务的间隔时间(缺省为60*1000ms),测试环境修改小点

  • 相关阅读:
    【搜索结果】高亮显示
    【搜索面板】排序单选
    【搜索面板】价格信息单选
    根据接口返回的数据重组数组
    Array.from
    获取指定字符串第n次出现的位置索引
    Object
    验证码倒计时
    iview Form表单正则验证
    网络图片转base64格式
  • 原文地址:https://www.cnblogs.com/yunyunde/p/11174536.html
Copyright © 2011-2022 走看看