update spring to 3.x

This commit is contained in:
Looly
2025-06-23 17:24:25 +08:00
parent fbf1b6cd1f
commit caf0ca658e
4 changed files with 32 additions and 39 deletions

20
bin/change_jdk_version.sh Normal file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
#
# Copyright (c) 2013-2025 Hutool Team and hutool.cn
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
export JAVA_HOME="/cygdrive/d/java/jdk-17.0.11"
export PATH="$JAVA_HOME/bin:$PATH"

View File

@@ -53,13 +53,13 @@
<!-- ssh versions -->
<jsch.version>0.2.21</jsch.version>
<sshj.version>0.39.0</sshj.version>
<sshj.version>0.40.0</sshj.version>
<sshd.version>2.15.0</sshd.version>
<ganymed-ssh2.version>262</ganymed-ssh2.version>
<net.version>3.11.1</net.version>
<emoji-java.version>5.1.1</emoji-java.version>
<spring-boot.version>2.7.18</spring-boot.version>
<spring-boot.version>3.5.3</spring-boot.version>
<oshi.version>6.8.1</oshi.version>
<byte-buddy.version>1.17.5</byte-buddy.version>
<commons-compress.version>1.27.1</commons-compress.version>
@@ -69,7 +69,7 @@
<!-- mq client versions -->
<kafka.version>4.0.0</kafka.version>
<rabbitmq.version>5.25.0</rabbitmq.version>
<rocketmq.version>5.3.2</rocketmq.version>
<rocketmq.version>5.3.3</rocketmq.version>
</properties>
<dependencies>
@@ -291,7 +291,7 @@
<dependency>
<groupId>org.apache.ftpserver</groupId>
<artifactId>ftpserver-core</artifactId>
<version>1.2.0</version>
<version>1.2.1</version>
<scope>compile</scope>
<exclusions>
<exclusion>
@@ -421,21 +421,13 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<version>${spring-boot.version}</version>
<optional>true</optional>
<exclusions>
<exclusion>
<artifactId>snakeyaml</artifactId>
<groupId>org.yaml</groupId>
</exclusion>
<exclusion>
<artifactId>log4j-to-slf4j</artifactId>
<groupId>org.apache.logging.log4j</groupId>
</exclusion>
<exclusion>
<artifactId>jul-to-slf4j</artifactId>
<groupId>org.slf4j</groupId>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
<optional>true</optional>
</dependency>
<dependency>
<groupId>io.github.biezhi</groupId>
@@ -512,28 +504,6 @@
<artifactId>spring-boot-starter-test</artifactId>
<version>${spring-boot.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>jakarta.activation-api</artifactId>
<groupId>jakarta.activation</groupId>
</exclusion>
<exclusion>
<artifactId>junit-jupiter</artifactId>
<groupId>org.junit.jupiter</groupId>
</exclusion>
<exclusion>
<artifactId>json-path</artifactId>
<groupId>com.jayway.jsonpath</groupId>
</exclusion>
<exclusion>
<artifactId>byte-buddy</artifactId>
<groupId>net.bytebuddy</groupId>
</exclusion>
<exclusion>
<artifactId>junit-jupiter-api</artifactId>
<groupId>org.junit.jupiter</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>

View File

@@ -18,6 +18,7 @@ package cn.hutool.v7.extra.spring;
import cn.hutool.v7.core.map.MapUtil;
import cn.hutool.v7.core.reflect.TypeReference;
import jakarta.annotation.Resource;
import lombok.Data;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
@@ -30,7 +31,6 @@ import org.springframework.core.env.ConfigurableEnvironment;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit.jupiter.SpringExtension;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;
@@ -67,7 +67,7 @@ public class SpringUtilTest {
try {
SpringUtil.getBean("testAutoWired");
} catch (final NoSuchBeanDefinitionException e) {
Assertions.assertEquals(e.getClass(), NoSuchBeanDefinitionException.class);
Assertions.assertEquals(NoSuchBeanDefinitionException.class, e.getClass());
}
}

View File

@@ -205,6 +205,9 @@
</goals>
</execution>
</executions>
<configuration>
<source>${compile.version}</source>
</configuration>
</plugin>
<!-- 统一更新pom版本 -->
<plugin>