application.yml 2.46 KB
eureka:
  client:
    fetch-registry: true
    register-with-eureka: true
    service-url:
#      defaultZone: http://localhost:8761/eureka/
      defaultZone: http://localhost:8761/eureka/,http://localhost:8762/eureka/
  instance:
    hostname: localhost
    lease-expiration-duration-in-seconds: 90
    lease-renewal-interval-in-seconds: 10
    prefer-ip-address: true

spring:
  cloud:
    gateway:
#      globalcors:
#        corsConfigurations:
#          '[/**]':
#            allowedOrigins: "*"
#            allowedMethods: "*"
#            allowedHeaders: "*"
      routes:
        - id: usersearch
          uri: http://121.40.30.78:9004
          predicates:
            - Path=/usersearch/**
          filters:
            - StripPrefix=1
        - id: SmartCampusWebApi
#          uri: http://120.26.116.253:9022
          uri: lb://SmartCampusWebApi
          predicates:
            - Path=/SmartCampusWebApi/**
          filters:
            - StripPrefix=1
        - id: file-center
          uri: lb://file-center
#          uri: http://121.40.30.78:5000
          predicates:
            - Path=/file-center/**
          filters:
            - StripPrefix=1
        - id: authserver
#          uri: http://121.40.30.78:9005
          uri: lb://authserver
          predicates:
            - Path=/authserver/**
          filters:
            - StripPrefix=1
        - id: NewSmartCampus
#          uri: http://114.55.30.100:1111
          uri: lb://NewSmartCampus
          predicates:
            - Path=/NewSmartCampus/**
          filters:
            - StripPrefix=1
        - id: dahua
#          uri: lb://dahua
          uri: http://114.55.30.100:8991
          predicates:
            - Path=/dahua/**
          filters:
            - StripPrefix=1
        - id: haikangserver
            #          uri: lb://dahua
          uri: http://121.40.109.21:9898
          predicates:
            - Path=/haikang/**
          filters:
            - StripPrefix=1
#      default-filters:
#        - DedupeResponseHeader=Access-Control-Allow-Origin, RETAIN_UNIQUE
#      discovery:
#        locator:
#          lowerCaseServiceId: true
#          enabled: true



#设置最大超时时间
ribbon:
  httpclient:
    enabled: false
  okhttp:
    enabled: true
  ReadTimeout: 90000
  ConnectTimeout: 90000
  OkToRetryOnAllOperations: true
  MaxAutoRetries: 1
  MaxAutoRetriesNextServer: 1


url:
  ignored: /SmartCampusWebApi/**,/authserver/**,/NewSmartCampus/**,/file-center/**,/dahua/**,/haikang/**