2024-03-27 14:49:04 +08:00
|
|
|
server:
|
|
|
|
port: 8500
|
|
|
|
spring:
|
|
|
|
profiles:
|
|
|
|
active: dev
|
|
|
|
application:
|
2024-03-27 21:27:05 +08:00
|
|
|
name: service-gateway
|
2024-03-28 10:09:43 +08:00
|
|
|
main:
|
|
|
|
web-application-type: reactive
|
2024-03-28 16:51:46 +08:00
|
|
|
# allow-bean-definition-overriding: true
|
2024-03-27 14:49:04 +08:00
|
|
|
|
|
|
|
cloud:
|
|
|
|
nacos:
|
|
|
|
discovery:
|
|
|
|
namespace: ${bunny.nacos.discovery.namespace}
|
|
|
|
server-addr: ${bunny.nacos.server-addr}
|
2024-03-27 15:32:51 +08:00
|
|
|
log-name: logs/${spring.application.name}
|
2024-03-27 20:08:32 +08:00
|
|
|
sentinel:
|
|
|
|
log:
|
|
|
|
dir: logs/${spring.application.name}/sentinel
|
2024-03-27 14:49:04 +08:00
|
|
|
gateway:
|
|
|
|
discovery:
|
|
|
|
locator:
|
|
|
|
enabled: true
|
2024-03-28 10:09:43 +08:00
|
|
|
# 解决跨域
|
|
|
|
# globalcors:
|
|
|
|
# cors-configurations:
|
|
|
|
# '[/**]':
|
|
|
|
# allowedOriginPatterns: "*"
|
|
|
|
# # 允许请求中携带的头信息
|
|
|
|
# allowedHeaders: "*"
|
|
|
|
# # 运行跨域的请求方式
|
|
|
|
# allowedMethods: "*"
|
|
|
|
# # 跨域检测的有效期,单位s
|
|
|
|
# maxAge: 3600099
|
2024-03-27 14:49:04 +08:00
|
|
|
# 路由
|
|
|
|
routes:
|
|
|
|
- id: service-product
|
|
|
|
uri: lb://service-product
|
|
|
|
predicates:
|
|
|
|
- Path=/*/product/**
|
2024-03-27 21:27:05 +08:00
|
|
|
- id: service-user
|
|
|
|
uri: lb://service-user
|
|
|
|
predicates:
|
|
|
|
- Path=/*/user/**
|
2024-03-28 14:47:27 +08:00
|
|
|
- id: service-cart
|
|
|
|
uri: lb://service-cart
|
|
|
|
predicates:
|
2024-03-28 16:51:46 +08:00
|
|
|
- Path=/api/order/cart/**
|
|
|
|
- id: service-order
|
|
|
|
uri: lb://service-order
|
|
|
|
predicates:
|
|
|
|
- Path=/api/order/orderInfo/**
|
2024-03-28 14:07:57 +08:00
|
|
|
data:
|
|
|
|
redis:
|
|
|
|
host: ${bunny.redis.host}
|
|
|
|
port: ${bunny.redis.port}
|
|
|
|
database: ${bunny.redis.database}
|
2024-03-27 14:49:04 +08:00
|
|
|
|
|
|
|
logging:
|
|
|
|
level:
|
|
|
|
com.atguigu.product.mapper: debug
|
|
|
|
com.atguigu.product.controller: info
|
|
|
|
com.atguigu.product.service: info
|
|
|
|
pattern:
|
|
|
|
dateformat: HH:mm:ss:SSS
|
|
|
|
file:
|
2024-03-27 15:32:51 +08:00
|
|
|
path: logs/${spring.application.name}
|