ny
23 小时以前 b6f169fe43a2b13f351aefc152374fc7f0bc8cb7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# 应用服务器
server:
  tomcat:
    uri-encoding: UTF-8
  port: 30000
# Spring
spring:
  application:
    # 应用名称
    name: gateway
  cloud:
    nacos:
      discovery:
        # 服务注册地址
        server-addr: 127.0.0.1:30099
    sentinel:
      # 取消控制台懒加载
      eager: true
      transport:
        # 控制台地址
        dashboard: 127.0.0.1:8718
      log:
        dir: log/sentinel
 
    gateway:
      discovery:
        locator:
          lowerCaseServiceId: true
          enabled: true
      routes:
        # 认证中心
        - id: oauth
          uri: lb://oauth
          predicates:
            - Path=/api/oauth/**
          filters:
            # 验证码处理
            - StripPrefix=2
        # 系统
        - id: system
          uri: lb://system
          predicates:
            - Path=/api/system/**
          filters:
            - StripPrefix=2
 
# 将配置设置到系统属性中
conf2system:
  # sentinel日志目录
  csp.sentinel.log.dir: log/${spring.application.name}/sentinel
  # sentinel日志等级 LOGGING日志等级, ALL, INFO, WARNING, SEVERE, OFF
  csp.sentinel.log.level: "OFF"
  # rocketmq日志等级 LOGGING日志等级, ALL, INFO, WARNING, SEVERE, OFF
  rocketmq.log.level: "OFF"