Ver código fonte

fix: 添加 actuator 依赖和配置

何文松 1 mês atrás
pai
commit
eae2c6cf99

+ 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