yangdamao 3 ماه پیش
والد
کامیت
8441cbc196

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

@@ -29,13 +29,13 @@ spring:
             webStatFilter:
                 enabled: true
             statViewServlet:
-                enabled: true
+                enabled: false
                 # 设置白名单,不填则允许所有访问
                 allow:
                 url-pattern: /druid/*
                 # 控制台管理用户名和密码
                 login-username: ruoyi
-                login-password: 123456
+                login-password: XYY@2025
             filter:
                 stat:
                     enabled: true

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

@@ -29,13 +29,13 @@ spring:
             webStatFilter:
                 enabled: true
             statViewServlet:
-                enabled: true
+                enabled: false
                 # 设置白名单,不填则允许所有访问
                 allow:
                 url-pattern: /druid/*
                 # 控制台管理用户名和密码
                 login-username: ruoyi
-                login-password: 123456
+                login-password: XYY@2025
             filter:
                 stat:
                     enabled: true

+ 3 - 1
zhongzheng-admin/src/main/resources/application.yml

@@ -105,8 +105,10 @@ management:
       base-path: /actuator
       exposure:
         # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
-        include: '*'
+        include: health, info  # 只启用健康和info端点
   endpoint:
+    health:
+      show-details: when_authorized  # 敏感信息需要授权
     logfile:
       external-file: ./logs/sys-console.log
 

+ 2 - 2
zhongzheng-api/src/main/resources/application-prod.yml

@@ -29,13 +29,13 @@ spring:
             webStatFilter:
                 enabled: true
             statViewServlet:
-                enabled: true
+                enabled: false
                 # 设置白名单,不填则允许所有访问
                 allow:
                 url-pattern: /druid/*
                 # 控制台管理用户名和密码
                 login-username: ruoyi
-                login-password: 123456
+                login-password: XYY@2025
             filter:
                 stat:
                     enabled: true

+ 3 - 1
zhongzheng-api/src/main/resources/application.yml

@@ -105,8 +105,10 @@ management:
       base-path: /actuator
       exposure:
         # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
-        include: '*'
+        include: health, info  # 只启用健康和info端点
   endpoint:
+    health:
+      show-details: when_authorized  # 敏感信息需要授权
     logfile:
       external-file: ./logs/sys-console.log
 

+ 1 - 1
zhongzheng-framework/src/main/java/com/zhongzheng/framework/config/SecurityConfig.java

@@ -169,7 +169,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
                 .antMatchers("/swagger-ui.html").anonymous()
                 .antMatchers("/swagger-resources/**").anonymous()
                 .antMatchers("/webjars/**").anonymous()
-                .antMatchers("/*/api-docs").anonymous()
+//                .antMatchers("/*/api-docs").anonymous()
                 .antMatchers("/druid/**").anonymous()
                 // Spring Boot Admin Server 的安全配置
                 .antMatchers(adminServerProperties.getContextPath()).anonymous()