瀏覽代碼

fix: 添加 actuator 依赖和配置

何文松 1 月之前
父節點
當前提交
eae2c6cf99
共有 2 個文件被更改,包括 12 次插入0 次删除
  1. 6 0
      backend/lingyue-starter/pom.xml
  2. 6 0
      backend/lingyue-starter/src/main/resources/application.properties

+ 6 - 0
backend/lingyue-starter/pom.xml

@@ -104,6 +104,12 @@
             <artifactId>spring-boot-starter-jdbc</artifactId>
         </dependency>
 
+        <!-- Spring Boot Actuator -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-actuator</artifactId>
+        </dependency>
+
         <!-- Lombok -->
         <dependency>
             <groupId>org.projectlombok</groupId>

+ 6 - 0
backend/lingyue-starter/src/main/resources/application.properties

@@ -102,6 +102,12 @@ xss.enabled=true
 xss.excludes=/auth/register,/auth/login
 xss.urlPatterns=/documents/*,/parse/*,/ai/*,/graphs/*
 
+# ============================================
+# Actuator 配置
+# ============================================
+management.endpoints.web.exposure.include=health,info,metrics
+management.endpoint.health.show-details=always
+
 # 日志配置(覆盖公共配置)
 logging.level.root=INFO
 logging.level.com.lingyue=INFO