Browse Source

update springboot 3.1.7 => 3.2.1 全面支持虚拟线程
update springboot-admin 3.1.8 => 3.2.0
update springdoc 2.2.0 => 2.3.0
update redisson 3.24.3 => 3.25.2
update hutool 5.8.22 => 5.8.24
update dynamic-ds 4.2.0 => 4.3.0

疯狂的狮子Li 1 year ago
parent
commit
30d7651322

+ 7 - 7
pom.xml

@@ -14,12 +14,12 @@
 
     <properties>
         <revision>5.2.0-SNAPSHOT</revision>
-        <spring-boot.version>3.1.7</spring-boot.version>
+        <spring-boot.version>3.2.1</spring-boot.version>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
         <java.version>17</java.version>
         <spring-boot.mybatis>3.0.3</spring-boot.mybatis>
-        <springdoc.version>2.2.0</springdoc.version>
+        <springdoc.version>2.3.0</springdoc.version>
         <therapi-javadoc.version>0.15.0</therapi-javadoc.version>
         <poi.version>5.2.3</poi.version>
         <easyexcel.version>3.3.3</easyexcel.version>
@@ -27,12 +27,12 @@
         <satoken.version>1.37.0</satoken.version>
         <mybatis-plus.version>3.5.5</mybatis-plus.version>
         <p6spy.version>3.9.1</p6spy.version>
-        <hutool.version>5.8.22</hutool.version>
+        <hutool.version>5.8.24</hutool.version>
         <okhttp.version>4.10.0</okhttp.version>
-        <spring-boot-admin.version>3.1.8</spring-boot-admin.version>
-        <redisson.version>3.24.3</redisson.version>
+        <spring-boot-admin.version>3.2.0</spring-boot-admin.version>
+        <redisson.version>3.25.2</redisson.version>
         <lock4j.version>2.2.5</lock4j.version>
-        <dynamic-ds.version>4.2.0</dynamic-ds.version>
+        <dynamic-ds.version>4.3.0</dynamic-ds.version>
         <alibaba-ttl.version>2.14.4</alibaba-ttl.version>
         <powerjob.version>4.3.6</powerjob.version>
         <mapstruct-plus.version>1.3.5</mapstruct-plus.version>
@@ -212,7 +212,7 @@
 
             <dependency>
                 <groupId>com.baomidou</groupId>
-                <artifactId>mybatis-plus-boot-starter</artifactId>
+                <artifactId>mybatis-plus-spring-boot3-starter</artifactId>
                 <version>${mybatis-plus.version}</version>
             </dependency>
 

+ 5 - 0
ruoyi-admin/src/main/resources/application.yml

@@ -61,6 +61,11 @@ user:
 spring:
   application:
     name: ${ruoyi.name}
+  threads:
+    # 开启虚拟线程 仅jdk21可用
+    # 开启后还需更改 UndertowConfig 虚拟线程配置
+    virtual:
+      enabled: false
   # 资源信息
   messages:
     # 国际化资源文件路径

+ 1 - 1
ruoyi-common/ruoyi-common-mybatis/pom.xml

@@ -39,7 +39,7 @@
 
         <dependency>
             <groupId>com.baomidou</groupId>
-            <artifactId>mybatis-plus-boot-starter</artifactId>
+            <artifactId>mybatis-plus-spring-boot3-starter</artifactId>
             <exclusions>
                 <exclusion>
                     <groupId>org.mybatis</groupId>

+ 12 - 0
ruoyi-common/ruoyi-common-web/pom.xml

@@ -7,6 +7,18 @@
         <artifactId>ruoyi-common</artifactId>
         <version>${revision}</version>
     </parent>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>21</source>
+                    <target>21</target>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
     <modelVersion>4.0.0</modelVersion>
 
     <artifactId>ruoyi-common-web</artifactId>

+ 4 - 0
ruoyi-common/ruoyi-common-web/src/main/java/org/dromara/common/web/config/UndertowConfig.java

@@ -24,6 +24,10 @@ public class UndertowConfig implements WebServerFactoryCustomizer<UndertowServle
             WebSocketDeploymentInfo webSocketDeploymentInfo = new WebSocketDeploymentInfo();
             webSocketDeploymentInfo.setBuffers(new DefaultByteBufferPool(false, 512));
             deploymentInfo.addServletContextAttribute("io.undertow.websockets.jsr.WebSocketDeploymentInfo", webSocketDeploymentInfo);
+            // 使用虚拟线程 解除下方注释 仅限jdk21
+//            if (SpringUtils.getProperty("spring.threads.virtual.enabled", Boolean.class, false)) {
+//                deploymentInfo.setExecutor(Executors.newVirtualThreadPerTaskExecutor());
+//            }
         });
     }