优化: 代码清理、日志替换为Logback、依赖升级
- 修复 DownloadCheckService 局部锁无效的问题,改用 synchronized - 修复 storageNode 中 lock 未用 try/finally 保护的问题 - 修复 BackupSubServer Get() 未关闭 HttpClient 的资源泄漏 - 修复 MultiThreadedHTTPServer requestLine 无判空的问题 - 删除各处的死代码/未用字段(channelFuture, promises, counter等) - 提取两个 HTTP Server 的公共方法到 CustomUtil(getRequestHeader, sendErrorResponse, sendFileRange) - MessageCodec 序列化改用 writeValueAsBytes 替代 valueToTree - 日志从 slf4j-simple 替换为 logback-classic,增加 10MB 轮转+保留10份 - Lombok 升级至 1.18.40,新增 maven-compiler-plugin 注解处理器配置 - GalleryTask 状态常量加 final,Config 异常改用 log.error
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.30</version>
|
||||
<version>1.18.40</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -41,9 +41,9 @@
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-simple</artifactId>
|
||||
<version>2.0.7</version>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-classic</artifactId>
|
||||
<version>1.4.14</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -68,6 +68,20 @@
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.13.0</version>
|
||||
<configuration>
|
||||
<annotationProcessorPaths>
|
||||
<path>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.40</version>
|
||||
</path>
|
||||
</annotationProcessorPaths>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- <plugin>-->
|
||||
<!-- <groupId>org.apache.maven.plugins</groupId>-->
|
||||
<!-- <artifactId>maven-assembly-plugin</artifactId>-->
|
||||
@@ -94,21 +108,21 @@
|
||||
<plugin>
|
||||
<groupId>org.graalvm.buildtools</groupId>
|
||||
<artifactId>native-maven-plugin</artifactId>
|
||||
<version>0.9.28</version>
|
||||
<version>0.10.3</version>
|
||||
<configuration>
|
||||
<mainClass>lion.Main</mainClass>
|
||||
<imageName>storageNode</imageName>
|
||||
<buildArgs>
|
||||
<arg>-H:+ReportExceptionStackTraces</arg>
|
||||
<arg>--gc=G1</arg>
|
||||
<arg>--enable-url-protocols=https</arg>
|
||||
<arg>-H:IncludeResources="simplelogger.properties"</arg>
|
||||
<arg>--initialize-at-build-time=org.slf4j.simple.SimpleLogger,org.slf4j.simple.SimpleLoggerFactory,org.slf4j.simple.SimpleLoggerConfiguration</arg>
|
||||
<arg>-H:IncludeResources="logback.xml"</arg>
|
||||
<arg>--initialize-at-build-time=ch.qos.logback.classic,ch.qos.logback.core,ch.qos.logback.classic.pattern,ch.qos.logback.core.pattern</arg>
|
||||
<arg>-H:ReflectionConfigurationFiles=src/main/resources/reflect-config.json</arg>
|
||||
</buildArgs>
|
||||
<metadataRepository>
|
||||
<enabled>true</enabled>
|
||||
</metadataRepository>
|
||||
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
||||
Reference in New Issue
Block a user