Browse Source

chore(config): 调整应用配置以切换到生产环境

- 将默认激活的配置文件从 dev 切换为 prod
- 修改 dev 环境的 okhttp 连接超时、读取超时、写入超时及重试次数配置
- 删除 dev 环境中部分非安全端点路径配置
- 更新 prod 环境的 Redis 连接信息,包括数据库索引、主机地址及密码
- 注释掉 prod 环境中部分互联互通的 WebSocket 接口配置
- 保持 prod 环境的非安全端点路径配置稳定
SheepHy 1 week ago
parent
commit
66ba243188

+ 4 - 4
src/main/resources/application-dev.yml

@@ -104,7 +104,6 @@ security:
     - /api/v1/auth/logout # 开放退出登录
     - /api/v1/auth/wx/miniapp/code-login # 微信小程序code登陆
     - /ws/** # WebSocket接口
-    - /dev/v1/linkData/** #互联互通
     - /api/third-party/query_token
     - /api/third-party/v1/get
   # 非安全端点路径,完全绕过 Spring Security 的安全控制
@@ -117,10 +116,11 @@ security:
     - /favicon.ico
 
 okhttp:
-  connect-timeout: 10s
-  read-timeout: 30s
-  write-timeout: 30s
+  connect-timeout: 30s
+  read-timeout: 120s
+  write-timeout: 60s
   retry-on-connection-failure: true
+  max-retry-count: 3
   connection-pool:
     max-idle-connections: 200
     keep-alive-duration: 300s

+ 4 - 4
src/main/resources/application-prod.yml

@@ -10,10 +10,10 @@ spring:
     password: 1KQaNI+vPz8^xfYcb%l6
   data:
     redis:
-      database: 11
-      host: 47.109.67.112
+      database: 6
+      host: 47.109.18.141
       port: 6379
-      password: RUw3C4tAF0aE4PVC
+      password: BXyzm3RKR2nA9vn5ZkeP
       timeout: 10s
       lettuce:
         pool:
@@ -85,7 +85,7 @@ security:
     - /api/v1/auth/refresh-token  # 刷新令牌接口
     - //api/v1/auth/wx/miniapp/code-login # 微信小程序code登陆
     - /ws/**                      # WebSocket接口
-    - /dev/v1/linkData/** #互联互通
+#    - /dev/v1/linkData/** #互联互通
   # 非安全端点路径,完全绕过 Spring Security 的过滤器
   unsecured-urls:
     - ${springdoc.swagger-ui.path}

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

@@ -2,7 +2,7 @@ spring:
   application:
     name: zsElectric-boot
   profiles:
-    active: dev
+    active: prod
   config:
     import: classpath:codegen.yml
   servlet: