24282 2 yıl önce
ebeveyn
işleme
84c09e7290

+ 2 - 0
hx-admin/src/main/resources/application-dev.yml

@@ -93,3 +93,5 @@ mail:
     # 调用邮箱服务url前缀
     urlPrefix: http://localhost:8088/mailService/
 
+hx:
+    httpUrl: http://localhost:9898/

+ 2 - 0
hx-admin/src/main/resources/application-prod.yml

@@ -97,3 +97,5 @@ mail:
     # 调用邮箱服务url前缀
     urlPrefix: http://localhost:8088/mailService/
 
+hx:
+    httpUrl: http://116.205.247.33:81/prod-api/

+ 4 - 1
hx-admin/src/main/resources/application-test.yml

@@ -95,4 +95,7 @@ seata:
 
 mail:
     # 调用邮箱服务url前缀
-    urlPrefix: http://localhost:8088/mailService/
+    urlPrefix: http://localhost:8088/mailService/
+
+hx:
+    httpUrl: http://36.134.91.96:10006/test-api/

+ 64 - 0
hx-admin/src/main/resources/application.yml

@@ -66,6 +66,70 @@ spring:
   main:
     allow-circular-references: true
 
+  autoconfigure:
+    # 排除 Druid 自动配置
+    exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
+
+  datasource:
+    # 指定使用 Druid 数据源
+    type: com.alibaba.druid.pool.DruidDataSource
+
+    dynamic:
+      druid:
+        # 初始连接数
+        initialSize: 3
+        # 最小连接池数量
+        minIdle: 10
+        # 最大连接池数量
+        maxActive: 100
+        # 配置获取连接等待超时的时间
+        maxWait: 60000
+        # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+        timeBetweenEvictionRunsMillis: 60000
+        # 配置一个连接在池中最小生存的时间,单位是毫秒
+        minEvictableIdleTimeMillis: 300000
+        # 配置一个连接在池中最大生存的时间,单位是毫秒
+        maxEvictableIdleTimeMillis: 900000
+        # 配置检测连接是否有效
+        validationQuery: SELECT 1 FROM DUAL
+        testWhileIdle: true
+        testOnBorrow: false
+        testOnReturn: false
+        poolPreparedStatements: true
+        maxPoolPreparedStatementPerConnectionSize: 20
+
+    druid:
+      webStatFilter:
+        enabled: true
+        exclusions:
+          - "*.js"
+          - "/druid/*"
+      statViewServlet:
+        enabled: true
+        # 设置白名单,不填则允许所有访问
+        allow:
+        urlPattern: /druid/*
+        # 控制台管理用户名和密码
+        loginUsername: superAdmin
+        loginPassword: 123456
+      filter:
+        # 配置StatFilter (SQL监控配置)
+        stat:
+          enabled: true # 开启 SQL 监控
+          logSlowSql: true  # 记录慢查询 SQL
+          slowSqlMillis: 1000 # 多长时间算慢查询
+          mergeSql: true # 条件参数化作为一条sql统计
+
+        # 配置WallFilter (防火墙配置)
+        wall:
+          enabled: true # 开启防火墙
+          config:
+            dropTableAllow: true # 允许删表操作
+            updateAllow: true # 允许更新操作
+            insertAllow: true # 允许插入操作
+            deleteAllow: true # 允许删除操作
+            multiStatementAllow: true # 支持一次执行多条sql
+
 # token配置
 token:
   # 令牌自定义标识