server: port: 8500 spring: profiles: active: dev application: name: service-gateway cloud: nacos: discovery: namespace: ${bunny.nacos.discovery.namespace} server-addr: ${bunny.nacos.server-addr} log-name: logs/${spring.application.name} sentinel: log: dir: logs/${spring.application.name}/sentinel 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/** - id: service-user uri: lb://service-user predicates: - Path=/*/user/** - id: service-order uri: lb://service-order predicates: - Path=/*/order/** 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}