getway 服务
先跑服务—》最后跑网关
application.yml 配置
server:
port: 8686
spring:
application:
name: gateway
cloud:
gateway:
globalcors: #全局跨域
cors-configurations:
'[/**]':
allowed-origins:
- "http://localhost:8383" #客户端(买家端) 调后端8686服务
- "http://localhost:8282" #客户端(卖家端)
allowed-headers: "*"
allowed-methods: "*"
max-age: 3600
discovery:
locator:
enabled: true