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
     gateway:
7
     gateway:
8
       # 路由数组:指当请求满足什么样的断言时,转发到哪个服务上
8
       # 路由数组:指当请求满足什么样的断言时,转发到哪个服务上
9
       routes:
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
       - id: wares
18
       - id: wares
11
         uri: lb://wares-service # 路由对应的微服务转发地址   服务名称
19
         uri: lb://wares-service # 路由对应的微服务转发地址   服务名称
12
         predicates:
20
         predicates:
@@ -49,9 +57,6 @@
49
           - Path=/sysmanage_service/**
57
           - Path=/sysmanage_service/**
50
 
58
 
51
   redis:
59
   redis:
52
-#    host: 8.141.0.149
53
-#    port: 6379
54
-#    password: bjtdba
55
     host: 123.56.214.150
60
     host: 123.56.214.150
56
     port: 6379
61
     port: 6379
57
     password: bjtdba
62
     password: bjtdba
@@ -88,3 +93,8 @@ logging:
88
     com:
93
     com:
89
       bjtdba:
94
       bjtdba:
90
         gateWay: DEBUG
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
   application:
4
   application:
5
     name: gateWay-server
5
     name: gateWay-server
6
   profiles:
6
   profiles:
7
-    active: dev
7
+    active: pro
8
 #  cloud:
8
 #  cloud:
9
 #    gateway:
9
 #    gateway:
10
 #      globalcors: # 全局 CORS 配置
10
 #      globalcors: # 全局 CORS 配置

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

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