sunxbiao před 10 měsíci
rodič
revize
56471a82b0

+ 13 - 3
gateWay_server/src/main/resources/application-pro.yml

@@ -7,6 +7,14 @@
7 7
     gateway:
8 8
       # 路由数组:指当请求满足什么样的断言时,转发到哪个服务上
9 9
       routes:
10
+      # 新增外部系统专用路由(放在现有路由之前)
11
+      - id: external-api
12
+        uri: lb://userCenter-service
13
+        predicates:
14
+          - Path=/external/**  # 外部系统专用路径
15
+        filters:
16
+          - ApiAuthFilter  # 应用鉴权过滤器
17
+          - StripPrefix=1  # 移除/external前缀
10 18
       - id: wares
11 19
         uri: lb://wares-service # 路由对应的微服务转发地址   服务名称
12 20
         predicates:
@@ -49,9 +57,6 @@
49 57
           - Path=/sysmanage_service/**
50 58
 
51 59
   redis:
52
-#    host: 8.141.0.149
53
-#    port: 6379
54
-#    password: bjtdba
55 60
     host: 123.56.214.150
56 61
     port: 6379
57 62
     password: bjtdba
@@ -88,3 +93,8 @@ logging:
88 93
     com:
89 94
       bjtdba:
90 95
         gateWay: DEBUG
96
+
97
+external:
98
+  api:
99
+    key: "HXJT_XFXD_B31_M_3279_Y_250707_01"   # 分配给外部系统B的API Key
100
+    secret: "8f^ynijrE9Mc9Q5ez5e8$Tm&$6Xx!ycQ"  # 高强度密钥(以后优化成多个)

+ 1 - 1
gateWay_server/src/main/resources/application.yml

@@ -4,7 +4,7 @@ spring:
4 4
   application:
5 5
     name: gateWay-server
6 6
   profiles:
7
-    active: dev
7
+    active: pro
8 8
 #  cloud:
9 9
 #    gateway:
10 10
 #      globalcors: # 全局 CORS 配置

+ 1 - 1
userCenter_service/src/main/resources/application.yml

@@ -2,7 +2,7 @@ spring:
2 2
   application:
3 3
     name: userCenter-service
4 4
   profiles:
5
-    active: dev
5
+    active: pro
6 6
   cache:
7 7
     type: caffeine
8 8
     caffeine: