spzx/spzx-server-gateway/src/main/resources/application.yml

46 lines
1.1 KiB
YAML
Raw Normal View History

server:
port: 8500
spring:
profiles:
active: dev
application:
name: server-gateway
cloud:
nacos:
discovery:
namespace: ${bunny.nacos.discovery.namespace}
server-addr: ${bunny.nacos.server-addr}
log-name: logs/${spring.application.name}
gateway:
discovery:
locator:
enabled: true
# 解决跨域
globalcors:
cors-configurations:
'[/**]':
allowedOriginPatterns: "*"
# 允许请求中携带的头信息
allowedHeaders: "*"
# 运行跨域的请求方式
allowedMethods: "*"
# 跨域检测的有效期,单位s
maxAge: 36000
# 路由
routes:
- id: service-product
uri: lb://service-product
predicates:
- Path=/*/product/**
logging:
level:
com.atguigu.product.mapper: debug
com.atguigu.product.controller: info
com.atguigu.product.service: info
pattern:
dateformat: HH:mm:ss:SSS
file:
path: logs/${spring.application.name}