- HttpClient 4.5.14 -> httpclient5 5.6.4(Boot 4.1.1 托管版本): HttpClient 4.x 最后一次发布是 2022-11,已 EOL,且 Boot 自 3.1 起不再管理它; httpmime 一并移除(httpclient5 已内置 multipart)。 代码迁移 3 个文件(LocalService、SubscriptionRefreshService、GalleryUtil): 包名 org.apache.http.* -> org.apache.hc.client5.http.*;HttpClient 5 用 response.getCode() 取代 response.getStatusLine().getStatusCode(); RequestConfig 的 socket 读超时改名 setSocketTimeout -> setResponseTimeout, 超时参数改为 Timeout.ofMilliseconds(...)。 MultipartEntityBuilder/EntityBuilder 仍在,仅换包名,行为不变。 - java-telegram-bot-api 7.9.1 -> 10.1.0(跨 3 个大版本)。本项目只用到 new TelegramBot(token)、new SendMessage(chatId, text)、bot.execute(msg), 已核对 10.1.0 的构造器与 execute 签名均兼容。 - hutool-all 5.8.26 -> 5.8.47;commons-compress 1.26.1 -> 1.28.0。 验证:mvn test 16 项全过(注意单测对 HTTP 是 mock,不能证明迁移后的真实网络路径); 另外做了针对性验证——隔离实例上 POST /personal/subBind/accounts/1/refresh 触发 真实上游下载,经迁移后的 httpclient5 成功取回 127,379 字节订阅并写入隔离缓存目录 (生产目录未被触碰);另用等价配置的 httpclient5 客户端实拉 https://example.com 返回 200 且正文可读。启动 5.09s、各接口正常、日志无 httpclient 相关异常。
150 lines
5.2 KiB
XML
150 lines
5.2 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
<modelVersion>4.0.0</modelVersion>
|
|
<parent>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-parent</artifactId>
|
|
<version>4.1.1</version>
|
|
<relativePath/> <!-- lookup parent from repository -->
|
|
</parent>
|
|
<groupId>com.lion</groupId>
|
|
<artifactId>LionWebsite</artifactId>
|
|
<version>0.0.1-SNAPSHOT</version>
|
|
<name>LionWebsite</name>
|
|
<description>LionWebsite</description>
|
|
<properties>
|
|
<java.version>21</java.version>
|
|
</properties>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-webmvc</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.mybatis.spring.boot</groupId>
|
|
<artifactId>mybatis-spring-boot-starter</artifactId>
|
|
<version>4.1.0</version>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.projectlombok</groupId>
|
|
<artifactId>lombok</artifactId>
|
|
<version>1.18.46</version>
|
|
<optional>true</optional>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-test</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.mybatis.spring.boot</groupId>
|
|
<artifactId>mybatis-spring-boot-starter-test</artifactId>
|
|
<version>4.1.0</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.jsoup</groupId>
|
|
<artifactId>jsoup</artifactId>
|
|
<version>1.23.2</version>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>cn.hutool</groupId>
|
|
<artifactId>hutool-all</artifactId>
|
|
<version>5.8.47</version>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.xerial</groupId>
|
|
<artifactId>sqlite-jdbc</artifactId>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.apache.httpcomponents.client5</groupId>
|
|
<artifactId>httpclient5</artifactId>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.apache.commons</groupId>
|
|
<artifactId>commons-lang3</artifactId>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.apache.commons</groupId>
|
|
<artifactId>commons-compress</artifactId>
|
|
<version>1.28.0</version>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>commons-io</groupId>
|
|
<artifactId>commons-io</artifactId>
|
|
<version>2.22.0</version>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>io.netty</groupId>
|
|
<artifactId>netty-all</artifactId>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>com.github.pengrad</groupId>
|
|
<artifactId>java-telegram-bot-api</artifactId>
|
|
<version>10.1.0</version>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-websocket</artifactId>
|
|
</dependency>
|
|
</dependencies>
|
|
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
<configuration>
|
|
<annotationProcessorPaths>
|
|
<path>
|
|
<groupId>org.projectlombok</groupId>
|
|
<artifactId>lombok</artifactId>
|
|
<version>1.18.46</version>
|
|
</path>
|
|
</annotationProcessorPaths>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.graalvm.buildtools</groupId>
|
|
<artifactId>native-maven-plugin</artifactId>
|
|
<version>1.1.8</version>
|
|
<configuration>
|
|
<imageName>lionwebsite</imageName>
|
|
<buildArgs>
|
|
<arg>-H:+ReportExceptionStackTraces</arg>
|
|
<arg>--initialize-at-build-time=org.apache.commons.logging.LogFactory,org.apache.commons.logging.LogFactoryService,org.sqlite.util.ProcessRunner</arg>
|
|
</buildArgs>
|
|
<metadataRepository>
|
|
<enabled>true</enabled>
|
|
</metadataRepository>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
<configuration>
|
|
<excludes>
|
|
<exclude>
|
|
<groupId>org.projectlombok</groupId>
|
|
<artifactId>lombok</artifactId>
|
|
</exclude>
|
|
</excludes>
|
|
</configuration>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
|
|
</project>
|