server:
  port: 14000

spring:
  application:
    name: gateway-server
  cloud:
    gateway:
      globalcors:
        cors-configurations:
          '[/**]':
            allowedOrigins: "*"
            allowedHeaders: "*"
            allowedMethods:
              - GET
              - POST
              - PUT
              - DELETE
              - PATCH
      default-filters:
        - name: Hystrix
          args:
            name: fallbackcmd
            fallbackUri: forward:/fallback
      routes:
        - id: userServer
          uri: lb://user-server
          predicates:
            - Path=/UserController/*/**

        - id: foodServer
          uri: lb://food-server
          predicates:
            - Path=/FoodController/*/**

        - id: businessServer
          uri: lb://business-server
          predicates:
            - Path=/BusinessController/*/**

        - id: cartServer
          uri: lb://cart-server
          predicates:
            - Path=/CartController/*/**

        - id: deliveryaddressServer
          uri: lb://deliveryaddress-server
          predicates:
            - Path=/DeliveryAddressController/*/**

        - id: ordersServer
          uri: lb://orders-server
          predicates:
            - Path=/OrdersController/*/**

        - id: searchServer
          uri: lb://search-server
          predicates:
            - Path=/SearchController/*/**

        - id: pointServer
          uri: lb://point-server
          predicates:
            - Path=/PointController/*/**

        - id: couponServer
          uri: lb://coupon-server
          predicates:
            - Path=/CouponController/*/**

        - id: collectServer
          uri: lb://collect-server
          predicates:
            - Path=/CollectController/*/**

eureka:
  client:
    service-url:
      defaultZone: http://eurekaServer13000:13000/eureka/,http://eurekaServer13001:13001/eureka/
  instance:
    prefer-ip-address: true #使用ip地址向eureka server进行注册
    instance-id: ${spring.cloud.client.ip-address}:${server.port} #设置eureka控制台中显示的注册信息
    lease-renewal-interval-in-seconds: 5
    lease-expiration-duration-in-seconds: 15