xiaochan 7 hónapja
szülő
commit
a16aa5ee2d

+ 4 - 1
.gitignore

@@ -32,4 +32,7 @@ build/
 ### VS Code ###
 .vscode/
 serverlog/
-.mvn/
+.mvn/
+*/Dockerfile
+*/run.bat
+logs

+ 4 - 2
pom.xml

@@ -50,13 +50,15 @@
             <artifactId>fastjson2</artifactId>
             <version>2.0.52</version>
         </dependency>
-
         <dependency>
             <groupId>com.github.xingfudeshi</groupId>
             <artifactId>knife4j-openapi3-jakarta-spring-boot-starter</artifactId>
             <version>4.6.0</version>
         </dependency>
-
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-actuator</artifactId>
+        </dependency>
     </dependencies>
 
     <dependencyManagement>

+ 2 - 1
thyy-archive/src/main/resources/logback-spring.xml

@@ -1,8 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <configuration>
 
+    <springProperty name="application_name" scope="context" source="spring.application.name"/>
     <springProperty scope="context" name="LOG_HOME" source="logging.path"
-                    defaultValue="serverlog"/>
+                    defaultValue="${user.dir}/logs/${application_name}"/>
 
     <!-- 日志级别 -->
     <springProperty scope="context" name="LOG_ROOT_LEVEL" source="logging.level.root" defaultValue="INFO"/>

+ 2 - 1
thyy-haikang/src/main/resources/logback-spring.xml

@@ -1,8 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <configuration>
 
+    <springProperty name="application_name" scope="context" source="spring.application.name"/>
     <springProperty scope="context" name="LOG_HOME" source="logging.path"
-                    defaultValue="serverlog"/>
+                    defaultValue="${user.dir}/logs/${application_name}"/>
 
     <!-- 日志级别 -->
     <springProperty scope="context" name="LOG_ROOT_LEVEL" source="logging.level.root" defaultValue="INFO"/>

+ 0 - 1
thyy-socket/src/main/java/org/thyy/socket/service/emr/EmrMapCenter.java

@@ -13,7 +13,6 @@ import java.util.concurrent.ConcurrentHashMap;
 @Component
 public class EmrMapCenter {
 
-
     static String PONG = """
             {"code":"pong"}
             """;

+ 3 - 0
thyy-socket/src/main/resources/application.yml

@@ -1,2 +1,5 @@
 server:
   port: 20922
+spring:
+  application:
+    name: thyy-socket

+ 2 - 1
thyy-socket/src/main/resources/logback-spring.xml

@@ -1,8 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <configuration>
 
+    <springProperty name="application_name" scope="context" source="spring.application.name"/>
     <springProperty scope="context" name="LOG_HOME" source="logging.path"
-                    defaultValue="serverlog"/>
+                    defaultValue="${user.dir}/logs/${application_name}"/>
 
     <!-- 日志级别 -->
     <springProperty scope="context" name="LOG_ROOT_LEVEL" source="logging.level.root" defaultValue="INFO"/>

+ 0 - 1
thyy-utils/src/main/resources/application.properties

@@ -1 +0,0 @@
-spring.application.name=thyy-utils