spring:
  application:
    name: microservice-zuul

  cloud:
    config:
      profile: dev
      uri: http://config:8777
  servlet:
    multipart:
      max-file-size: 10MB
      max-request-size: 50MB
#      discovery:
#        enabled: true
#        service-id: microservice-config-server

server:
  port: 8046
info:
  version: 0.1

#如果Zuul使用服务发现，则需要使用
ribbon:
  ReadTimeout: 600000
  ConnectTimeout: 30000

#熔断机制超时
hystrix:
  command:
    default:
      execution:
        timeout:
          enabled: true
        isolation:
          thread:
            timeoutInMilliseconds: 600000
zuul:
  max:
    host:
      connections: 500
  host:
    socket-timeout-millis: 600000
    connect-timeout-millis: 600000
  ribbon:
    eager-load:
       enabled: true
    eureka:
        enabled: true
  routes:
    auth:    #认证服务
      #响应的路径
      path: /authorization/**
      #敏感头信息
      sensitive-headers: Access-Control-Allow-Origin
      #重定向到的服务（根据服务id名称从注册中心获取服务地址）
      serviceId:  microservice-oauth2
    admin: #生产者服务
      #响应的路径
      path: /admin/**
      #敏感头信息
      sensitive-headers: Access-Control-Allow-Origin
      #重定向到的服务（根据服务id名称从注册中心获取服务地址）
      serviceId:  microservice-admin
    equipment: #生产者服务
      #响应的路径
      path: /equipment/**
      #敏感头信息
      sensitive-headers: Access-Control-Allow-Origin
      #重定向到的服务（根据服务id名称从注册中心获取服务地址）
      serviceId:  microservice-equipment
    alram: #生产者服务
      #响应的路径
      path: /alram/**
      #敏感头信息
      sensitive-headers: Access-Control-Allow-Origin
      #重定向到的服务（根据服务id名称从注册中心获取服务地址）
      serviceId:  microservice-alram

  #添加代理头
  add-proxy-headers: true

auth-server: http://auth:8300 # oauth-server地址

security:
  oauth2:
    client:
      client-id: suntray
      client-secret: suntray
      user-authorization-uri: ${auth-server}/oauth/authorize #请求认证的地址
      access-token-uri: ${auth-server}/oauth/token #请求令牌的地址
    resource:
      jwt:
        key-uri: ${auth-server}/oauth/token_key
      user-info-uri: ${auth-server}/user/me
      token-info-uri: ${auth-server}/oauth/check_token


eureka:
  client:
    fetch-registry: true
    registry-fetch-interval-seconds: 8
    serviceUrl:
      defaultZone: http://user:password123@eureka:8762/eureka
  instance:
    lease-renewal-interval-in-seconds: 4
    lease-expiration-duration-in-seconds: 12
    prefer-ip-address: true
    instance-id: ${spring.cloud.client.ip-address}:${spring.application.instance_id:${server.port}}

filter:
#  referers: http://192.168.1.116:8090,http://localhost:8090
  referers: http://192.168.1.115,http://localhost
#  referers: http://10.20.72.33
