Przeglądaj źródła

bump: 发布2.0.0

details see: https://helio.uncarbon.cc/#/i18n/zh-CN/appendix/change-log
Uncarbon 2 lat temu
rodzic
commit
dbc5989fcc
46 zmienionych plików z 373 dodań i 400 usunięć
  1. 9 8
      helio-core/pom.xml
  2. 2 2
      helio-core/src/main/java/cc/uncarbon/framework/core/config/AdaptHistoryVersionAutoConfiguration.java
  3. 5 3
      helio-core/src/main/java/cc/uncarbon/framework/core/context/TenantContext.java
  4. 11 9
      helio-core/src/main/java/cc/uncarbon/framework/core/context/UserContext.java
  5. 8 20
      helio-core/src/main/java/cc/uncarbon/framework/core/enums/HelioBaseEnum.java
  6. 3 3
      helio-core/src/main/java/cc/uncarbon/framework/core/page/PageParam.java
  7. 5 5
      helio-core/src/main/java/cc/uncarbon/framework/core/page/PageResult.java
  8. 4 2
      helio-starter-aop/pom.xml
  9. 4 2
      helio-starter-cloud/pom.xml
  10. 7 5
      helio-starter-crud/pom.xml
  11. 8 6
      helio-starter-crud/src/main/java/cc/uncarbon/framework/crud/dynamicdatasource/DataSourceDefinition.java
  12. 11 9
      helio-starter-crud/src/main/java/cc/uncarbon/framework/crud/entity/HelioBaseEntity.java
  13. 4 2
      helio-starter-dubbo/pom.xml
  14. 11 2
      helio-starter-dubbo/src/main/java/cc/uncarbon/framework/dubbo/filter/ConsumerContextFilter.java
  15. 10 14
      helio-starter-dubbo/src/main/java/cc/uncarbon/framework/dubbo/filter/HelioDubboExceptionFilter.java
  16. 13 6
      helio-starter-dubbo/src/main/java/cc/uncarbon/framework/dubbo/filter/ProviderContextFilter.java
  17. 1 0
      helio-starter-dubbo/src/main/resources/META-INF/dubbo/org.apache.dubbo.validation.Validation
  18. 4 2
      helio-starter-i18n/pom.xml
  19. 12 8
      helio-starter-knife4j/pom.xml
  20. 47 69
      helio-starter-knife4j/src/main/java/cc/uncarbon/framework/knife4j/config/HelioKnife4jAutoConfiguration.java
  21. 0 85
      helio-starter-knife4j/src/main/java/cc/uncarbon/framework/knife4j/config/Knife4jEnumPropertyAutoConfiguration.java
  22. 86 0
      helio-starter-knife4j/src/main/java/cc/uncarbon/framework/knife4j/customizer/HelioBaseEnumCustomizer.java
  23. 0 1
      helio-starter-knife4j/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
  24. 4 2
      helio-starter-rate-limit-redis/pom.xml
  25. 4 8
      helio-starter-redis/pom.xml
  26. 4 2
      helio-starter-rocketmq-aliyun/pom.xml
  27. 1 1
      helio-starter-rocketmq-aliyun/src/main/java/cc/uncarbon/framework/rocketmq/container/RocketConsumerContainer.java
  28. 1 1
      helio-starter-rocketmq-aliyun/src/main/java/cc/uncarbon/framework/rocketmq/container/RocketProducerContainer.java
  29. 3 6
      helio-starter-rocketmq-aliyun/src/main/java/cc/uncarbon/framework/rocketmq/core/strategy/ProducerStrategy.java
  30. 3 6
      helio-starter-rocketmq-aliyun/src/main/java/cc/uncarbon/framework/rocketmq/core/strategy/PutProducerStrategy.java
  31. 7 5
      helio-starter-satoken/pom.xml
  32. 4 2
      helio-starter-seata/pom.xml
  33. 1 1
      helio-starter-tenant/pom.xml
  34. 2 2
      helio-starter-tenant/src/main/java/cc/uncarbon/framework/tenant/tenantdatasource/GlobalTenantDataSourceAdvisor.java
  35. 4 2
      helio-starter-test/pom.xml
  36. 4 2
      helio-starter-web/pom.xml
  37. 7 7
      helio-starter-web/src/main/java/cc/uncarbon/framework/web/aspect/WebLoggingAspect.java
  38. 4 3
      helio-starter-web/src/main/java/cc/uncarbon/framework/web/config/GlobalWebExceptionHandlerAutoConfiguration.java
  39. 3 4
      helio-starter-web/src/main/java/cc/uncarbon/framework/web/config/XssAutoConfiguration.java
  40. 3 3
      helio-starter-web/src/main/java/cc/uncarbon/framework/web/model/request/IdsDTO.java
  41. 4 4
      helio-starter-web/src/main/java/cc/uncarbon/framework/web/model/response/ApiResult.java
  42. 1 1
      helio-starter-web/src/main/java/cc/uncarbon/framework/web/util/IPUtil.java
  43. 3 3
      helio-starter-web/src/main/java/cc/uncarbon/framework/web/util/InvalidFieldUtil.java
  44. 2 2
      helio-starter-web/src/main/java/cc/uncarbon/framework/web/xss/XssFilter.java
  45. 6 6
      helio-starter-web/src/main/java/cc/uncarbon/framework/web/xss/XssHttpServletRequestWrapper.java
  46. 33 64
      pom.xml

+ 9 - 8
helio-core/pom.xml

@@ -2,13 +2,15 @@
 <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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <packaging>jar</packaging>
+
     <parent>
         <artifactId>helio-starters</artifactId>
         <groupId>cc.uncarbon.framework</groupId>
-        <version>1.11.0</version><!-- BATCH REPLACEMENT MARK -->
+        <version>2.0.0</version><!-- BATCH REPLACEMENT MARK -->
         <relativePath>../pom.xml</relativePath>
     </parent>
-    <modelVersion>4.0.0</modelVersion>
 
     <artifactId>helio-core</artifactId>
 
@@ -50,8 +52,8 @@
 
         <!-- javax validation 注解包 -->
         <dependency>
-            <groupId>javax.validation</groupId>
-            <artifactId>validation-api</artifactId>
+            <groupId>jakarta.validation</groupId>
+            <artifactId>jakarta.validation-api</artifactId>
         </dependency>
 
         <!-- TTL -->
@@ -66,10 +68,10 @@
             <artifactId>hutool-all</artifactId>
         </dependency>
 
-        <!-- knife4j 注解包 -->
+        <!-- SpringDoc 注解包 -->
         <dependency>
-            <groupId>com.github.xiaoymin</groupId>
-            <artifactId>knife4j-annotations</artifactId>
+            <groupId>io.swagger.core.v3</groupId>
+            <artifactId>swagger-annotations</artifactId>
         </dependency>
 
         <!-- mybatis-plus 注解包 -->
@@ -78,5 +80,4 @@
             <artifactId>mybatis-plus-annotation</artifactId>
         </dependency>
     </dependencies>
-
 </project>

+ 2 - 2
helio-core/src/main/java/cc/uncarbon/framework/core/config/AdaptHistoryVersionAutoConfiguration.java

@@ -52,8 +52,8 @@ public class AdaptHistoryVersionAutoConfiguration implements EnvironmentAware {
             Map<String, Object> newMap = new LinkedHashMap<>();
             for (PropertySource<?> source : sources) {
                 // 根据类判断是否为 SpringBoot .yml 或者 .properties 的配置
-                if (source instanceof OriginTrackedMapPropertySource) {
-                    processPropertySource((OriginTrackedMapPropertySource) source, newMap);
+                if (source instanceof OriginTrackedMapPropertySource originTrackedMapPropertySource) {
+                    processPropertySource(originTrackedMapPropertySource, newMap);
                 }
             }
 

+ 5 - 3
helio-core/src/main/java/cc/uncarbon/framework/core/context/TenantContext.java

@@ -1,12 +1,13 @@
 package cc.uncarbon.framework.core.context;
 
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.AllArgsConstructor;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 import lombok.experimental.Accessors;
 import lombok.experimental.SuperBuilder;
 
+import java.io.Serial;
 import java.io.Serializable;
 
 /**
@@ -21,14 +22,15 @@ import java.io.Serializable;
 @Data
 public class TenantContext implements Serializable {
 
+    @Serial
     private static final long serialVersionUID = 1L;
 
     public static final String CAMEL_NAME = "tenantContext";
 
-    @ApiModelProperty(value = "租户ID")
+    @Schema(description = "租户ID")
     private Long tenantId;
 
-    @ApiModelProperty(value = "租户名")
+    @Schema(description = "租户名")
     private String tenantName;
 
 }

+ 11 - 9
helio-core/src/main/java/cc/uncarbon/framework/core/context/UserContext.java

@@ -1,13 +1,14 @@
 package cc.uncarbon.framework.core.context;
 
 import cn.hutool.core.lang.Dict;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.AllArgsConstructor;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 import lombok.experimental.Accessors;
 import lombok.experimental.SuperBuilder;
 
+import java.io.Serial;
 import java.io.Serializable;
 import java.util.List;
 import java.util.Set;
@@ -24,32 +25,33 @@ import java.util.Set;
 @Data
 public class UserContext implements Serializable {
 
+    @Serial
     private static final long serialVersionUID = 1L;
 
     public static final String CAMEL_NAME = "userContext";
 
-    @ApiModelProperty(value = "用户ID")
+    @Schema(description = "用户ID")
     private Long userId;
 
-    @ApiModelProperty(value = "用户账号")
+    @Schema(description = "用户账号")
     private String userName;
 
-    @ApiModelProperty(value = "用户手机号")
+    @Schema(description = "用户手机号")
     private String userPhoneNo;
 
-    @ApiModelProperty(value = "用户类型")
+    @Schema(description = "用户类型")
     private String userTypeStr;
 
-    @ApiModelProperty(value = "用户拥有角色ID", notes = "后台管理使用", example = "[1, 2, 3]")
+    @Schema(description = "用户拥有角色ID", title = "后台管理使用", example = "[1, 2, 3]")
     private Set<Long> rolesIds;
 
-    @ApiModelProperty(value = "用户拥有角色名称", notes = "后台管理使用", example = "[SuperAdmin, Admin, CEO]")
+    @Schema(description = "用户拥有角色名称", title = "后台管理使用", example = "[SuperAdmin, Admin, CEO]")
     private List<String> roles;
 
-    @ApiModelProperty(value = "附加数据")
+    @Schema(description = "附加数据")
     private Dict extraData;
 
-    @ApiModelProperty(value = "客户端IP地址")
+    @Schema(description = "客户端IP地址")
     private String clientIP;
 
 }

+ 8 - 20
helio-core/src/main/java/cc/uncarbon/framework/core/enums/HelioBaseEnum.java

@@ -124,18 +124,6 @@ public interface HelioBaseEnum<T> extends Serializable {
         );
     }
 
-    /**
-     * 将不定类型的 value 统一转换为 int
-     * 按常见的数据类型依次判断,提高命中率
-     * @deprecated since 1.10.1, replaced with getValueAsInt()
-     *
-     * @return int value
-     */
-    @Deprecated
-    default int convertValue2Int() {
-        return getValueAsInt();
-    }
-
     /**
      * 将不定类型的 value 统一转换为 int
      * 按常见的数据类型依次判断,提高命中率
@@ -147,17 +135,17 @@ public interface HelioBaseEnum<T> extends Serializable {
         if (value == null) {
             throw new IllegalArgumentException("enum's value CANNOT be null");
         }
-        if (value instanceof Integer) {
-            return (Integer) value;
+        if (value instanceof Integer i) {
+            return i;
         }
-        if (value instanceof Long) {
-            return ((Long) value).intValue();
+        if (value instanceof Long l) {
+            return l.intValue();
         }
-        if (value instanceof Number) {
-            return ((Number) value).intValue();
+        if (value instanceof Number n) {
+            return n.intValue();
         }
-        if (value instanceof String) {
-            return NumberUtil.toBigDecimal((String) value).intValue();
+        if (value instanceof String s) {
+            return NumberUtil.toBigDecimal(s).intValue();
         }
         throw new HelioFrameworkException("enum's value CANNOT convert to int");
     }

+ 3 - 3
helio-core/src/main/java/cc/uncarbon/framework/core/page/PageParam.java

@@ -1,6 +1,6 @@
 package cc.uncarbon.framework.core.page;
 
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.AllArgsConstructor;
 import lombok.Data;
 import lombok.NoArgsConstructor;
@@ -20,7 +20,7 @@ import java.util.function.UnaryOperator;
 @Data
 public class PageParam implements Serializable {
 
-    @ApiModelProperty(value = "当前页码")
+    @Schema(description = "当前页码")
     private Integer pageNum;
     public Integer getPageNum() {
         if (pageNum == null) {
@@ -33,7 +33,7 @@ public class PageParam implements Serializable {
         return pageNum;
     }
 
-    @ApiModelProperty(value = "当前页大小")
+    @Schema(description = "当前页大小")
     private Integer pageSize;
     public Integer getPageSize() {
         if (pageSize == null) {

+ 5 - 5
helio-core/src/main/java/cc/uncarbon/framework/core/page/PageResult.java

@@ -1,6 +1,6 @@
 package cc.uncarbon.framework.core.page;
 
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.AllArgsConstructor;
 import lombok.Data;
 import lombok.NoArgsConstructor;
@@ -22,16 +22,16 @@ import java.util.List;
 @Data
 public class PageResult<T extends Serializable> implements Serializable {
 
-    @ApiModelProperty(value = "当前页")
+    @Schema(description = "当前页")
     private long current;
 
-    @ApiModelProperty(value = "当前页数量")
+    @Schema(description = "当前页数量")
     private long size;
 
-    @ApiModelProperty(value = "总量")
+    @Schema(description = "总量")
     private long total;
 
-    @ApiModelProperty(value = "记录")
+    @Schema(description = "记录")
     private List<T> records;
 
 

+ 4 - 2
helio-starter-aop/pom.xml

@@ -2,13 +2,15 @@
 <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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <packaging>jar</packaging>
+
     <parent>
         <artifactId>helio-starters</artifactId>
         <groupId>cc.uncarbon.framework</groupId>
-        <version>1.11.0</version><!-- BATCH REPLACEMENT MARK -->
+        <version>2.0.0</version><!-- BATCH REPLACEMENT MARK -->
         <relativePath>../pom.xml</relativePath>
     </parent>
-    <modelVersion>4.0.0</modelVersion>
 
     <artifactId>helio-starter-aop</artifactId>
 

+ 4 - 2
helio-starter-cloud/pom.xml

@@ -2,13 +2,15 @@
 <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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <packaging>jar</packaging>
+
     <parent>
         <artifactId>helio-starters</artifactId>
         <groupId>cc.uncarbon.framework</groupId>
-        <version>1.11.0</version><!-- BATCH REPLACEMENT MARK -->
+        <version>2.0.0</version><!-- BATCH REPLACEMENT MARK -->
         <relativePath>../pom.xml</relativePath>
     </parent>
-    <modelVersion>4.0.0</modelVersion>
 
     <artifactId>helio-starter-cloud</artifactId>
 

+ 7 - 5
helio-starter-crud/pom.xml

@@ -2,13 +2,15 @@
 <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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <packaging>jar</packaging>
+
     <parent>
         <artifactId>helio-starters</artifactId>
         <groupId>cc.uncarbon.framework</groupId>
-        <version>1.11.0</version><!-- BATCH REPLACEMENT MARK -->
+        <version>2.0.0</version><!-- BATCH REPLACEMENT MARK -->
         <relativePath>../pom.xml</relativePath>
     </parent>
-    <modelVersion>4.0.0</modelVersion>
 
     <artifactId>helio-starter-crud</artifactId>
 
@@ -25,12 +27,12 @@
         <!-- 这里写其他第三方依赖 -->
         <dependency>
             <groupId>com.baomidou</groupId>
-            <artifactId>mybatis-plus-boot-starter</artifactId>
+            <artifactId>mybatis-plus-spring-boot3-starter</artifactId>
         </dependency>
 
         <dependency>
-            <groupId>mysql</groupId>
-            <artifactId>mysql-connector-java</artifactId>
+            <groupId>com.mysql</groupId>
+            <artifactId>mysql-connector-j</artifactId>
         </dependency>
 
         <dependency>

+ 8 - 6
helio-starter-crud/src/main/java/cc/uncarbon/framework/crud/dynamicdatasource/DataSourceDefinition.java

@@ -1,12 +1,13 @@
 package cc.uncarbon.framework.crud.dynamicdatasource;
 
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.AllArgsConstructor;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 import lombok.experimental.Accessors;
 import lombok.experimental.SuperBuilder;
 
+import java.io.Serial;
 import java.io.Serializable;
 
 /**
@@ -19,36 +20,37 @@ import java.io.Serializable;
 @Data
 public class DataSourceDefinition implements Serializable {
 
+    @Serial
     private static final long serialVersionUID = 1L;
 
     /**
      * 数据源名称,切换数据源时需要这个,最好不用数字开头
      */
-    @ApiModelProperty(value = "数据源名称", notes = "切换数据源时需要这个,最好不用数字开头")
+    @Schema(description = "数据源名称", title = "切换数据源时需要这个,最好不用数字开头")
     private String name;
 
     /**
      * 数据库驱动类名称
      */
-    @ApiModelProperty(value = "数据库驱动类名称")
+    @Schema(description = "数据库驱动类名称")
     private String driverClassName;
 
     /**
      * 数据库连接地址
      */
-    @ApiModelProperty(value = "数据库连接地址")
+    @Schema(description = "数据库连接地址")
     private String url;
 
     /**
      * 数据库账号
      */
-    @ApiModelProperty(value = "数据库账号")
+    @Schema(description = "数据库账号")
     private String username;
 
     /**
      * 数据库密码
      */
-    @ApiModelProperty(value = "数据库密码")
+    @Schema(description = "数据库密码")
     private String password;
 
 }

+ 11 - 9
helio-starter-crud/src/main/java/cc/uncarbon/framework/crud/entity/HelioBaseEntity.java

@@ -3,7 +3,7 @@ package cc.uncarbon.framework.crud.entity;
 import cc.uncarbon.framework.core.constant.HelioConstant;
 import com.baomidou.mybatisplus.annotation.*;
 import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.AllArgsConstructor;
 import lombok.Data;
 import lombok.NoArgsConstructor;
@@ -11,6 +11,7 @@ import lombok.experimental.Accessors;
 import lombok.experimental.SuperBuilder;
 import org.springframework.format.annotation.DateTimeFormat;
 
+import java.io.Serial;
 import java.io.Serializable;
 import java.time.LocalDateTime;
 
@@ -27,20 +28,21 @@ import java.time.LocalDateTime;
 @Data
 public abstract class HelioBaseEntity<T extends Serializable> implements Serializable {
 
+    @Serial
     private static final long serialVersionUID = 1L;
 
 
     /**
      * 主键ID
      */
-    @ApiModelProperty(value = "主键ID")
+    @Schema(description = "主键ID")
     @TableId(value = "id", type = IdType.ASSIGN_ID)
     private T id;
 
     /**
      * 行级租户ID
      */
-    @ApiModelProperty(value = "行级租户ID")
+    @Schema(description = "行级租户ID")
     @TableField(value = HelioConstant.CRUD.COLUMN_TENANT_ID, fill = FieldFill.INSERT)
     private Long tenantId;
 
@@ -48,7 +50,7 @@ public abstract class HelioBaseEntity<T extends Serializable> implements Seriali
      * 乐观锁
      * 需自行加@Version注解才有效
      */
-    @ApiModelProperty(value = "乐观锁", notes = "需再次复制本字段,并自行加 @Version 注解才有效")
+    @Schema(description = "乐观锁", title = "需再次复制本字段,并自行加 @Version 注解才有效")
     @TableField(value = "revision")
     private Long revision;
 
@@ -56,7 +58,7 @@ public abstract class HelioBaseEntity<T extends Serializable> implements Seriali
      * 逻辑删除标识
      * 0=否 1=是
      */
-    @ApiModelProperty(value = "逻辑删除标识", notes = "0=否 1=是")
+    @Schema(description = "逻辑删除标识", title = "0=否 1=是")
     @TableLogic
     @TableField(value = "del_flag")
     private Integer delFlag;
@@ -64,7 +66,7 @@ public abstract class HelioBaseEntity<T extends Serializable> implements Seriali
     /**
      * 创建时刻
      */
-    @ApiModelProperty(value = "创建时刻")
+    @Schema(description = "创建时刻")
     @DateTimeFormat(pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
     @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
     @TableField(value = HelioConstant.CRUD.COLUMN_CREATED_AT, fill = FieldFill.INSERT)
@@ -73,14 +75,14 @@ public abstract class HelioBaseEntity<T extends Serializable> implements Seriali
     /**
      * 创建者
      */
-    @ApiModelProperty(value = "创建者")
+    @Schema(description = "创建者")
     @TableField(value = HelioConstant.CRUD.COLUMN_CREATED_BY, fill = FieldFill.INSERT)
     private String createdBy;
 
     /**
      * 更新时刻
      */
-    @ApiModelProperty(value = "更新时刻")
+    @Schema(description = "更新时刻")
     @DateTimeFormat(pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
     @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
     @TableField(value = HelioConstant.CRUD.COLUMN_UPDATED_AT, fill = FieldFill.INSERT_UPDATE)
@@ -89,7 +91,7 @@ public abstract class HelioBaseEntity<T extends Serializable> implements Seriali
     /**
      * 更新者
      */
-    @ApiModelProperty(value = "更新者")
+    @Schema(description = "更新者")
     @TableField(value = HelioConstant.CRUD.COLUMN_UPDATED_BY, fill = FieldFill.INSERT_UPDATE)
     private String updatedBy;
 

+ 4 - 2
helio-starter-dubbo/pom.xml

@@ -2,13 +2,15 @@
 <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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <packaging>jar</packaging>
+
     <parent>
         <artifactId>helio-starters</artifactId>
         <groupId>cc.uncarbon.framework</groupId>
-        <version>1.11.0</version><!-- BATCH REPLACEMENT MARK -->
+        <version>2.0.0</version><!-- BATCH REPLACEMENT MARK -->
         <relativePath>../pom.xml</relativePath>
     </parent>
-    <modelVersion>4.0.0</modelVersion>
 
     <artifactId>helio-starter-dubbo</artifactId>
 

+ 11 - 2
helio-starter-dubbo/src/main/java/cc/uncarbon/framework/dubbo/filter/ConsumerContextFilter.java

@@ -26,8 +26,9 @@ public class ConsumerContextFilter implements Filter {
      */
     @Override
     public Result invoke(Invoker<?> invoker, Invocation invocation) throws RpcException {
-        RpcContextAttachment clientAttachment = RpcContext.getClientAttachment();
-        if (clientAttachment.isConsumerSide()) {
+        if (isConsumerSide(invoker)) {
+            RpcContextAttachment clientAttachment = RpcContext.getClientAttachment();
+
             UserContext userContext = UserContextHolder.getUserContext();
             if (userContext != null) {
                 log.debug("[Dubbo RPC] 设置当前用户上下文 >> {}", userContext);
@@ -44,4 +45,12 @@ public class ConsumerContextFilter implements Filter {
         return invoker.invoke(invocation);
     }
 
+    /**
+     * 原来的 clientAttachment.isConsumerSide() 抽风了,只能手撸一个了
+     * @return 调用源是否为【消费者】
+     */
+    private boolean isConsumerSide(Invoker<?> invoker) {
+        return CommonConstants.CONSUMER_SIDE.equals(invoker.getUrl().getSide());
+    }
+
 }

+ 10 - 14
helio-starter-dubbo/src/main/java/cc/uncarbon/framework/dubbo/filter/HelioDubboExceptionFilter.java

@@ -28,22 +28,18 @@ public class HelioDubboExceptionFilter extends ExceptionFilter {
 
         try {
             Throwable exception = appResponse.getException();
-            if (isExceptionCheckedOrAppearsInSign(invoker, invocation, exception)) {
-                return;
-            }
-
-            // for the exception not found in method's signature, print ERROR message in server's log.
-            log.error(
-                    "Got unchecked and undeclared exception which called by {}. service: {}, method: {}, exception: {} >> {}",
-                    RpcContext.getServiceContext().getRemoteAddress(), invoker.getInterface().getName(),
-                    invocation.getMethodName(), exception.getClass().getName(), exception.getMessage(), exception);
+            if (!isExceptionCheckedOrAppearsInSign(invoker, invocation, exception)) {
+                // for the exception not found in method's signature, print ERROR message in server's log.
+                log.error(
+                        "Got unchecked and undeclared exception which called by {}. service: {}, method: {}, exception: {} >> {}",
+                        RpcContext.getServiceContext().getRemoteAddress(), invoker.getInterface().getName(),
+                        invocation.getMethodName(), exception.getClass().getName(), exception.getMessage(), exception);
 
-            if (canReturnDirectly(invoker, exception)) {
-                return;
+                if (!canReturnDirectly(invoker, exception)) {
+                    // wrap with RuntimeException and throw back to the client
+                    appResponse.setException(new RuntimeException(StrUtil.toString(exception)));
+                }
             }
-
-            // otherwise, wrap with RuntimeException and throw back to the client
-            appResponse.setException(new RuntimeException(StrUtil.toString(exception)));
         } catch (NoSuchMethodException cause) {
             // ignored
         } catch (Throwable cause) {

+ 13 - 6
helio-starter-dubbo/src/main/java/cc/uncarbon/framework/dubbo/filter/ProviderContextFilter.java

@@ -26,22 +26,21 @@ public class ProviderContextFilter implements Filter {
      */
     @Override
     public Result invoke(Invoker<?> invoker, Invocation invocation) throws RpcException {
-        RpcContextAttachment serverAttachment = RpcContext.getServerAttachment();
-        if (serverAttachment.isProviderSide()) {
+        if (isProviderSide(invoker)) {
+            RpcContextAttachment serverAttachment = RpcContext.getServerAttachment();
+
             // 清理数据,避免线程池化复用残留
             UserContextHolder.clear();
             TenantContextHolder.clear();
 
             Object attachment = serverAttachment.getObjectAttachment(UserContext.CAMEL_NAME);
-            if (attachment instanceof UserContext) {
-                UserContext userContext = (UserContext) attachment;
+            if (attachment instanceof UserContext userContext) {
                 UserContextHolder.setUserContext(userContext);
                 log.debug("[Dubbo RPC] 取出当前用户上下文 >> {}", userContext);
             }
 
             attachment = serverAttachment.getObjectAttachment(TenantContext.CAMEL_NAME);
-            if (attachment instanceof TenantContext) {
-                TenantContext tenantContext = (TenantContext) attachment;
+            if (attachment instanceof TenantContext tenantContext) {
                 TenantContextHolder.setTenantContext(tenantContext);
                 log.debug("[Dubbo RPC] 取出当前租户上下文 >> {}", tenantContext);
             }
@@ -49,4 +48,12 @@ public class ProviderContextFilter implements Filter {
 
         return invoker.invoke(invocation);
     }
+
+    /**
+     * 原来的 serverAttachment.isProviderSide() 抽风了,只能手撸一个了
+     * @return 调用源是否为【提供者】
+     */
+    private boolean isProviderSide(Invoker<?> invoker) {
+        return CommonConstants.PROVIDER.equals(invoker.getUrl().getSide());
+    }
 }

+ 1 - 0
helio-starter-dubbo/src/main/resources/META-INF/dubbo/org.apache.dubbo.validation.Validation

@@ -0,0 +1 @@
+jvalidation=org.apache.dubbo.validation.support.jvalidation.JValidationNew

+ 4 - 2
helio-starter-i18n/pom.xml

@@ -2,13 +2,15 @@
 <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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <packaging>jar</packaging>
+
     <parent>
         <artifactId>helio-starters</artifactId>
         <groupId>cc.uncarbon.framework</groupId>
-        <version>1.11.0</version><!-- BATCH REPLACEMENT MARK -->
+        <version>2.0.0</version><!-- BATCH REPLACEMENT MARK -->
         <relativePath>../pom.xml</relativePath>
     </parent>
-    <modelVersion>4.0.0</modelVersion>
 
     <artifactId>helio-starter-i18n</artifactId>
 

+ 12 - 8
helio-starter-knife4j/pom.xml

@@ -2,13 +2,15 @@
 <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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <packaging>jar</packaging>
+
     <parent>
         <artifactId>helio-starters</artifactId>
         <groupId>cc.uncarbon.framework</groupId>
-        <version>1.11.0</version><!-- BATCH REPLACEMENT MARK -->
+        <version>2.0.0</version><!-- BATCH REPLACEMENT MARK -->
         <relativePath>../pom.xml</relativePath>
     </parent>
-    <modelVersion>4.0.0</modelVersion>
 
     <artifactId>helio-starter-knife4j</artifactId>
 
@@ -26,12 +28,14 @@
         <!-- 这里写其他第三方依赖 -->
         <dependency>
             <groupId>com.github.xiaoymin</groupId>
-            <artifactId>knife4j-spring-boot-starter</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>com.github.xiaoymin</groupId>
-            <artifactId>knife4j-micro-spring-boot-starter</artifactId>
+            <artifactId>knife4j-openapi3-jakarta-spring-boot-starter</artifactId>
+            <exclusions>
+                <!-- 用不到 -->
+                <exclusion>
+                    <groupId>org.webjars</groupId>
+                    <artifactId>swagger-ui</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
     </dependencies>
 </project>

+ 47 - 69
helio-starter-knife4j/src/main/java/cc/uncarbon/framework/knife4j/config/HelioKnife4jAutoConfiguration.java

@@ -1,93 +1,71 @@
 package cc.uncarbon.framework.knife4j.config;
 
-
 import cc.uncarbon.framework.core.props.HelioProperties;
+import cc.uncarbon.framework.knife4j.customizer.HelioBaseEnumCustomizer;
+import cn.hutool.core.text.CharSequenceUtil;
 import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j;
-import lombok.RequiredArgsConstructor;
-import org.springframework.beans.factory.annotation.Value;
+import io.swagger.v3.oas.models.Components;
+import io.swagger.v3.oas.models.OpenAPI;
+import io.swagger.v3.oas.models.info.Info;
+import io.swagger.v3.oas.models.security.SecurityRequirement;
+import io.swagger.v3.oas.models.security.SecurityScheme;
+import org.springdoc.core.configuration.SpringDocConfiguration;
 import org.springframework.boot.autoconfigure.AutoConfiguration;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Import;
-import org.springframework.core.annotation.Order;
-import springfox.bean.validators.configuration.BeanValidatorPluginsConfiguration;
-import springfox.documentation.builders.ApiInfoBuilder;
-import springfox.documentation.builders.PathSelectors;
-import springfox.documentation.builders.RequestHandlerSelectors;
-import springfox.documentation.oas.annotations.EnableOpenApi;
-import springfox.documentation.service.ApiInfo;
-import springfox.documentation.service.ApiKey;
-import springfox.documentation.service.AuthorizationScope;
-import springfox.documentation.service.SecurityReference;
-import springfox.documentation.spi.DocumentationType;
-import springfox.documentation.spi.service.contexts.SecurityContext;
-import springfox.documentation.spring.web.plugins.Docket;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
+import org.springframework.core.env.ConfigurableEnvironment;
 
 
 /**
  * Helio knife4j 自动配置类
- * 参考http://events.jianshu.io/p/2f19c1863da0
  *
  * @author Uncarbon
  * @author xiaoymin
  */
-@EnableOpenApi
+@Import(value = {HelioBaseEnumCustomizer.class})
 @EnableKnife4j
-@Import(BeanValidatorPluginsConfiguration.class)
-@RequiredArgsConstructor
-@AutoConfiguration
+@ConditionalOnExpression(value = "!${knife4j.production:false}")
+@AutoConfiguration(before = SpringDocConfiguration.class)
 public class HelioKnife4jAutoConfiguration {
 
-    @Value(value = "${sa-token.token-name:Authorization}")
-    private String headerTokenName;
-
-    private final HelioProperties helioProperties;
-
-
     @Bean
-    @Order(value = 1)
-    public Docket groupRestApi() {
-        return new Docket(DocumentationType.OAS_30)
-                .apiInfo(this.apiInfo())
-                .select()
-                // 对所有API进行抓取
-                .apis(RequestHandlerSelectors.any())
-                .paths(PathSelectors.any())
-                .build()
-                // 在调试页上附加请求头
-                .securityContexts(Collections.singletonList(this.securityContext()))
-                .securitySchemes(Collections.singletonList(this.apiKeyOfToken()));
-    }
-
-    private ApiInfo apiInfo() {
-        return new ApiInfoBuilder()
-                .title(helioProperties.getKnife4j().getTitle())
-                .description(helioProperties.getKnife4j().getDescription())
-                .termsOfServiceUrl("")
-                .contact(ApiInfo.DEFAULT_CONTACT)
-                .version(helioProperties.getKnife4j().getVersion())
-                .build();
-    }
-
-    private SecurityContext securityContext() {
-        List<SecurityReference> references = new ArrayList<>();
-
-        AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything");
-        AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];
-        authorizationScopes[0] = authorizationScope;
-
-        references.add(new SecurityReference(headerTokenName, authorizationScopes));
-
-        return SecurityContext.builder()
-                .securityReferences(references)
-                .build();
+    @ConditionalOnMissingBean(value = OpenAPI.class)
+    public OpenAPI openApi(HelioProperties helioProperties, ConfigurableEnvironment env) {
+        OpenAPI openApi = new OpenAPI();
+        // 基本信息
+        openApi.setInfo(buildInfo(helioProperties));
+
+        // 全局安全要求
+        String headerTokenName = CharSequenceUtil.blankToDefault(env.getProperty("sa-token.token-name"), "Authorization");
+        SecurityScheme securityScheme = new SecurityScheme()
+                // 取个名字,方便被引用
+                .name(headerTokenName)
+                .type(SecurityScheme.Type.APIKEY)
+                .in(SecurityScheme.In.HEADER);
+
+        SecurityRequirement securityRequirement = new SecurityRequirement()
+                // 引用上面定义的SecurityScheme
+                .addList(headerTokenName);
+
+        openApi
+                .components(new Components()
+                        // 在components里定义SecurityScheme
+                        .addSecuritySchemes("APIKEY", securityScheme))
+                // 添加SecurityRequirement作为全局安全要求
+                .addSecurityItem(securityRequirement);
+
+        return openApi;
     }
 
-    private ApiKey apiKeyOfToken() {
-        return new ApiKey(headerTokenName, headerTokenName, "header");
+    private Info buildInfo(HelioProperties helioProperties) {
+        Info info = new Info();
+        HelioProperties.Knife4j knife4j = helioProperties.getKnife4j();
+        info.setTitle(knife4j.getTitle());
+        info.setDescription(knife4j.getDescription());
+        info.setVersion(knife4j.getVersion());
+        return info;
     }
 
 }

+ 0 - 85
helio-starter-knife4j/src/main/java/cc/uncarbon/framework/knife4j/config/Knife4jEnumPropertyAutoConfiguration.java

@@ -1,85 +0,0 @@
-package cc.uncarbon.framework.knife4j.config;
-
-import cc.uncarbon.framework.core.enums.HelioBaseEnum;
-import com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition;
-import io.swagger.annotations.ApiModelProperty;
-import org.springframework.boot.autoconfigure.AutoConfiguration;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
-import springfox.documentation.schema.Annotations;
-import springfox.documentation.spi.DocumentationType;
-import springfox.documentation.spi.schema.ModelPropertyBuilderPlugin;
-import springfox.documentation.spi.schema.contexts.ModelPropertyContext;
-import springfox.documentation.swagger.schema.ApiModelProperties;
-
-import java.lang.reflect.AnnotatedElement;
-import java.util.Optional;
-
-/**
- * knife4j 枚举增强自动配置类
- * 非生产环境下,为 knife4j 文档生成枚举类描述
- * <p>
- * 示例代码:<br />
- * {@code @ApiModelProperty(value} = "性别")<br />
- * private GenderEnum gender;
- * <p>
- * 输出文档描述:
- * 性别(0=未知 1=男 2=女)
- *
- * @author Demon-HY
- * @author Uncarbon
- */
-@ConditionalOnProperty(prefix = "knife4j", value = "production", havingValue = "false")
-@AutoConfiguration
-public class Knife4jEnumPropertyAutoConfiguration implements ModelPropertyBuilderPlugin {
-
-    @Override
-    public void apply(ModelPropertyContext context) {
-        Optional<ApiModelProperty> annotation = Optional.empty();
-        Class<?> rawPrimaryType = null;
-
-        Optional<AnnotatedElement> annotatedElement = context.getAnnotatedElement();
-        if (annotatedElement.isPresent()) {
-            annotation = ApiModelProperties.findApiModePropertyAnnotation(annotatedElement.get());
-        }
-
-        Optional<BeanPropertyDefinition> beanPropertyDefinition = context.getBeanPropertyDefinition();
-        if (beanPropertyDefinition.isPresent()) {
-            annotation = Annotations.findPropertyAnnotation(beanPropertyDefinition.get(), ApiModelProperty.class);
-            rawPrimaryType = beanPropertyDefinition.get().getRawPrimaryType();
-        }
-
-        // 过滤得到目标类型
-        if (annotation.isPresent() && rawPrimaryType != null && HelioBaseEnum.class.isAssignableFrom(rawPrimaryType)) {
-            // 获取枚举类中的所有枚举项
-            HelioBaseEnum<?>[] enumItems = (HelioBaseEnum<?>[]) rawPrimaryType.getEnumConstants();
-
-            /*
-            拼接描述字符串
-             */
-            StringBuilder newDescription = new StringBuilder(128)
-                    .append(annotation.get().value())
-                    .append("(");
-
-            for (int i = 0; i < enumItems.length; i++) {
-                newDescription
-                        .append(enumItems[i].getValue())
-                        .append("=")
-                        .append(enumItems[i].getLabel());
-
-                if (i < enumItems.length - 1) {
-                    // 不是最后一项,增加分割符
-                    newDescription.append(" ");
-                }
-            }
-            newDescription.append(")<br />");
-
-            // 更新文档中的描述
-            context.getSpecificationBuilder().description(newDescription.toString());
-        }
-    }
-
-    @Override
-    public boolean supports(DocumentationType documentationType) {
-        return true;
-    }
-}

+ 86 - 0
helio-starter-knife4j/src/main/java/cc/uncarbon/framework/knife4j/customizer/HelioBaseEnumCustomizer.java

@@ -0,0 +1,86 @@
+package cc.uncarbon.framework.knife4j.customizer;
+
+import cc.uncarbon.framework.core.enums.HelioBaseEnum;
+import com.fasterxml.jackson.databind.type.SimpleType;
+import io.swagger.v3.core.converter.AnnotatedType;
+import io.swagger.v3.oas.models.media.Schema;
+import io.swagger.v3.oas.models.parameters.Parameter;
+import org.springdoc.core.customizers.ParameterCustomizer;
+import org.springdoc.core.customizers.PropertyCustomizer;
+import org.springframework.core.MethodParameter;
+
+import java.util.Objects;
+
+/**
+ * HelioBaseEnum子枚举增强
+ * <p>
+ * 示例代码:<br />
+ * {@code @Schema(description} = "性别")<br />
+ * private GenderEnum gender;
+ * <p>
+ * 输出文档描述:
+ * 性别(0=未知 1=男 2=女)
+ *
+ * @author Uncarbon
+ */
+public class HelioBaseEnumCustomizer implements PropertyCustomizer, ParameterCustomizer {
+
+    /**
+     * 主要用于 @Schema 注解标记的字段
+     */
+    @Override
+    public Schema<?> customize(Schema property, AnnotatedType propertyType) {
+        if (Objects.nonNull(property) && Objects.nonNull(propertyType)) {
+            try {
+                SimpleType simpleType = (SimpleType) propertyType.getType();
+                if (HelioBaseEnum.class.isAssignableFrom(simpleType.getRawClass())) {
+                    property.setDescription(determineDescription(simpleType.getRawClass(), property.getDescription()));
+                }
+            } catch (Exception e) {
+                // fail to customize, ignored
+            }
+        }
+        return property;
+    }
+
+    /**
+     *
+     * 主要用于 @Parameter 注解标记的字段,以及路径参数、Query
+     */
+    @Override
+    public Parameter customize(Parameter parameterModel, MethodParameter methodParameter) {
+        if (Objects.nonNull(parameterModel) && Objects.nonNull(methodParameter)
+                && HelioBaseEnum.class.isAssignableFrom(methodParameter.getParameterType())) {
+            parameterModel.setDescription(determineDescription(methodParameter.getParameterType(), parameterModel.getDescription()));
+        }
+        return parameterModel;
+    }
+
+    /**
+     * 确定输出的描述文本
+     */
+    protected String determineDescription(Class<?> helioBaseEnum, String originalDescription) {
+        // 获取枚举类中的所有枚举项
+        HelioBaseEnum<?>[] enumItems = (HelioBaseEnum<?>[]) helioBaseEnum.getEnumConstants();
+
+        // 拼接描述字符串
+        StringBuilder newDescription = new StringBuilder(128)
+                .append(originalDescription)
+                .append('(');
+
+        for (int i = 0; i < enumItems.length; i++) {
+            newDescription
+                    .append(enumItems[i].getValue())
+                    .append('=')
+                    .append(enumItems[i].getLabel());
+
+            if (i < enumItems.length - 1) {
+                // 不是最后一项,增加分割符
+                newDescription.append(' ');
+            }
+        }
+        newDescription.append(")<br />");
+
+        return newDescription.toString();
+    }
+}

+ 0 - 1
helio-starter-knife4j/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports

@@ -1,2 +1 @@
 cc.uncarbon.framework.knife4j.config.HelioKnife4jAutoConfiguration
-cc.uncarbon.framework.knife4j.config.Knife4jEnumPropertyAutoConfiguration

+ 4 - 2
helio-starter-rate-limit-redis/pom.xml

@@ -2,13 +2,15 @@
 <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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <packaging>jar</packaging>
+
     <parent>
         <artifactId>helio-starters</artifactId>
         <groupId>cc.uncarbon.framework</groupId>
-        <version>1.11.0</version><!-- BATCH REPLACEMENT MARK -->
+        <version>2.0.0</version><!-- BATCH REPLACEMENT MARK -->
         <relativePath>../pom.xml</relativePath>
     </parent>
-    <modelVersion>4.0.0</modelVersion>
 
     <artifactId>helio-starter-rate-limit-redis</artifactId>
     <description>基于Redis实现的限流组件,内置简易的3种限流策略(全局限流、根据当前用户ID限流、根据客户端IP限流)</description>

+ 4 - 8
helio-starter-redis/pom.xml

@@ -2,13 +2,15 @@
 <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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <packaging>jar</packaging>
+
     <parent>
         <artifactId>helio-starters</artifactId>
         <groupId>cc.uncarbon.framework</groupId>
-        <version>1.11.0</version><!-- BATCH REPLACEMENT MARK -->
+        <version>2.0.0</version><!-- BATCH REPLACEMENT MARK -->
         <relativePath>../pom.xml</relativePath>
     </parent>
-    <modelVersion>4.0.0</modelVersion>
 
     <artifactId>helio-starter-redis</artifactId>
 
@@ -22,12 +24,6 @@
             <groupId>org.redisson</groupId>
             <artifactId>redisson-spring-boot-starter</artifactId>
         </dependency>
-
-        <!-- 适配 Spring Boot 2.7 -->
-        <dependency>
-            <groupId>org.redisson</groupId>
-            <artifactId>redisson-spring-data-27</artifactId>
-        </dependency>
     </dependencies>
 
 </project>

+ 4 - 2
helio-starter-rocketmq-aliyun/pom.xml

@@ -2,13 +2,15 @@
 <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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <packaging>jar</packaging>
+
     <parent>
         <artifactId>helio-starters</artifactId>
         <groupId>cc.uncarbon.framework</groupId>
-        <version>1.11.0</version><!-- BATCH REPLACEMENT MARK -->
+        <version>2.0.0</version><!-- BATCH REPLACEMENT MARK -->
         <relativePath>../pom.xml</relativePath>
     </parent>
-    <modelVersion>4.0.0</modelVersion>
 
     <artifactId>helio-starter-rocketmq-aliyun</artifactId>
 

+ 1 - 1
helio-starter-rocketmq-aliyun/src/main/java/cc/uncarbon/framework/rocketmq/container/RocketConsumerContainer.java

@@ -25,11 +25,11 @@ import cc.uncarbon.framework.rocketmq.core.factory.execution.ThreadPoolExecutorE
 import cc.uncarbon.framework.rocketmq.core.serializer.RocketSerializer;
 import cc.uncarbon.framework.rocketmq.core.utils.AnnotatedMethodsUtils;
 import cc.uncarbon.framework.rocketmq.props.AliyunRocketProperties;
+import jakarta.annotation.PostConstruct;
 import lombok.NonNull;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.ApplicationContextAware;
 
-import javax.annotation.PostConstruct;
 import java.util.concurrent.ThreadPoolExecutor;
 
 /**

+ 1 - 1
helio-starter-rocketmq-aliyun/src/main/java/cc/uncarbon/framework/rocketmq/container/RocketProducerContainer.java

@@ -20,11 +20,11 @@ import cc.uncarbon.framework.rocketmq.annotation.RocketMessage;
 import cc.uncarbon.framework.rocketmq.core.factory.ThreadPoolFactory;
 import cc.uncarbon.framework.rocketmq.core.strategy.RocketConsumerStrategy;
 import cc.uncarbon.framework.rocketmq.props.AliyunRocketProperties;
+import jakarta.annotation.PostConstruct;
 import lombok.NonNull;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.ApplicationContextAware;
 
-import javax.annotation.PostConstruct;
 import java.util.Map;
 import java.util.concurrent.ThreadPoolExecutor;
 

+ 3 - 6
helio-starter-rocketmq-aliyun/src/main/java/cc/uncarbon/framework/rocketmq/core/strategy/ProducerStrategy.java

@@ -42,20 +42,17 @@ public class ProducerStrategy {
     }
 
     public static void statsSendMessage(Long startDeliverTime, String shardingKeyFactory, Map<String, Object> consumerContainer, RocketMessage rocketMessage, Object message, byte[] bytes, ApplicationContext applicationContext) {
-        if (message instanceof CommonMessage) {
-            CommonMessage commonMessage = (CommonMessage) message;
+        if (message instanceof CommonMessage commonMessage) {
             Producer producer = ProducerConsumerFactory.getProducer(consumerContainer, rocketMessage, commonMessage);
             SendMessageFactory.sendMessage(startDeliverTime, producer, commonMessage, bytes, applicationContext);
             return;
         }
-        if (message instanceof OrderMessage) {
-            OrderMessage orderMessage = (OrderMessage) message;
+        if (message instanceof OrderMessage orderMessage) {
             OrderProducer orderProducer = ProducerConsumerFactory.getProducer(consumerContainer, rocketMessage, orderMessage);
             SendMessageFactory.sendMessage(orderProducer, orderMessage, bytes, shardingKeyFactory);
             return;
         }
-        if (message instanceof TransactionMessage) {
-            TransactionMessage transactionMessage = (TransactionMessage) message;
+        if (message instanceof TransactionMessage transactionMessage) {
             TransactionProducer transactionProducer = ProducerConsumerFactory.getProducer(consumerContainer, rocketMessage, transactionMessage);
             SendMessageFactory.sendMessage(transactionProducer, transactionMessage, bytes, applicationContext);
         }

+ 3 - 6
helio-starter-rocketmq-aliyun/src/main/java/cc/uncarbon/framework/rocketmq/core/strategy/PutProducerStrategy.java

@@ -47,8 +47,7 @@ public class PutProducerStrategy {
     }
 
     public static void putProducer(Map<String, Object> producerConsumer, RocketMessage rocketMessage, Object bean, AliyunRocketProperties rocketProperties, ApplicationContext applicationContext) {
-        if (bean instanceof CommonMessage) {
-            CommonMessage commonMessage = (CommonMessage) bean;
+        if (bean instanceof CommonMessage commonMessage) {
             String producerConsumerKey = ProducerConsumerFactory.getProducerConsumerKey(rocketMessage, commonMessage);
             Producer producer = ProducerFactory.createProducer(rocketMessage, rocketProperties);
             ThreadPoolExecutor callbackThreadPoolExecutor = ThreadPoolFactory.createCallbackThreadPoolExecutor(rocketProperties);
@@ -57,16 +56,14 @@ public class PutProducerStrategy {
             producerConsumer.put(producerConsumerKey, producer);
             return;
         }
-        if (bean instanceof OrderMessage) {
-            OrderMessage orderMessage = (OrderMessage) bean;
+        if (bean instanceof OrderMessage orderMessage) {
             String producerConsumerKey = ProducerConsumerFactory.getProducerConsumerKey(rocketMessage, orderMessage);
             OrderProducer orderProducer = ProducerFactory.createOrderProducer(rocketMessage, rocketProperties);
             orderProducer.start();
             producerConsumer.put(producerConsumerKey, orderProducer);
             return;
         }
-        if (bean instanceof TransactionMessage) {
-            TransactionMessage transactionMessage = (TransactionMessage) bean;
+        if (bean instanceof TransactionMessage transactionMessage) {
             String producerConsumerKey = ProducerConsumerFactory.getProducerConsumerKey(rocketMessage, transactionMessage);
             LocalTransactionChecker localTransactionChecker = ApplicationContextUtils.getLocalTransactionChecker(applicationContext, transactionMessage.transactionStatus(), transactionMessage.checker());
             TransactionProducer transactionProducer = ProducerFactory.createTransactionProducer(rocketMessage, rocketProperties, localTransactionChecker);

+ 7 - 5
helio-starter-satoken/pom.xml

@@ -2,13 +2,15 @@
 <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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <packaging>jar</packaging>
+
     <parent>
         <artifactId>helio-starters</artifactId>
         <groupId>cc.uncarbon.framework</groupId>
-        <version>1.11.0</version><!-- BATCH REPLACEMENT MARK -->
+        <version>2.0.0</version><!-- BATCH REPLACEMENT MARK -->
         <relativePath>../pom.xml</relativePath>
     </parent>
-    <modelVersion>4.0.0</modelVersion>
 
     <artifactId>helio-starter-satoken</artifactId>
 
@@ -25,13 +27,13 @@
 
         <!-- 这里写其他第三方依赖 -->
         <dependency>
-            <groupId>javax.servlet</groupId>
-            <artifactId>javax.servlet-api</artifactId>
+            <groupId>jakarta.servlet</groupId>
+            <artifactId>jakarta.servlet-api</artifactId>
         </dependency>
 
         <dependency>
             <groupId>cn.dev33</groupId>
-            <artifactId>sa-token-spring-boot-starter</artifactId>
+            <artifactId>sa-token-spring-boot3-starter</artifactId>
         </dependency>
 
         <dependency>

+ 4 - 2
helio-starter-seata/pom.xml

@@ -2,13 +2,15 @@
 <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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <packaging>jar</packaging>
+
     <parent>
         <artifactId>helio-starters</artifactId>
         <groupId>cc.uncarbon.framework</groupId>
-        <version>1.11.0</version><!-- BATCH REPLACEMENT MARK -->
+        <version>2.0.0</version><!-- BATCH REPLACEMENT MARK -->
         <relativePath>../pom.xml</relativePath>
     </parent>
-    <modelVersion>4.0.0</modelVersion>
 
     <artifactId>helio-starter-seata</artifactId>
 

+ 1 - 1
helio-starter-tenant/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>helio-starters</artifactId>
         <groupId>cc.uncarbon.framework</groupId>
-        <version>1.11.0</version><!-- BATCH REPLACEMENT MARK -->
+        <version>2.0.0</version><!-- BATCH REPLACEMENT MARK -->
     </parent>
     <modelVersion>4.0.0</modelVersion>
 

+ 2 - 2
helio-starter-tenant/src/main/java/cc/uncarbon/framework/tenant/tenantdatasource/GlobalTenantDataSourceAdvisor.java

@@ -34,8 +34,8 @@ public class GlobalTenantDataSourceAdvisor extends AbstractPointcutAdvisor imple
 
     @Override
     public void setBeanFactory(@NonNull BeanFactory beanFactory) throws BeansException {
-        if (this.advice instanceof BeanFactoryAware) {
-            ((BeanFactoryAware) this.advice).setBeanFactory(beanFactory);
+        if (this.advice instanceof BeanFactoryAware beanFactoryAware) {
+            beanFactoryAware.setBeanFactory(beanFactory);
         }
     }
 

+ 4 - 2
helio-starter-test/pom.xml

@@ -2,13 +2,15 @@
 <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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <packaging>jar</packaging>
+
     <parent>
         <artifactId>helio-starters</artifactId>
         <groupId>cc.uncarbon.framework</groupId>
-        <version>1.11.0</version><!-- BATCH REPLACEMENT MARK -->
+        <version>2.0.0</version><!-- BATCH REPLACEMENT MARK -->
         <relativePath>../pom.xml</relativePath>
     </parent>
-    <modelVersion>4.0.0</modelVersion>
 
     <artifactId>helio-starter-test</artifactId>
 

+ 4 - 2
helio-starter-web/pom.xml

@@ -2,13 +2,15 @@
 <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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <packaging>jar</packaging>
+
     <parent>
         <artifactId>helio-starters</artifactId>
         <groupId>cc.uncarbon.framework</groupId>
-        <version>1.11.0</version><!-- BATCH REPLACEMENT MARK -->
+        <version>2.0.0</version><!-- BATCH REPLACEMENT MARK -->
         <relativePath>../pom.xml</relativePath>
     </parent>
-    <modelVersion>4.0.0</modelVersion>
 
     <artifactId>helio-starter-web</artifactId>
 

+ 7 - 7
helio-starter-web/src/main/java/cc/uncarbon/framework/web/aspect/WebLoggingAspect.java

@@ -1,16 +1,16 @@
 package cc.uncarbon.framework.web.aspect;
 
+import jakarta.servlet.http.HttpServletRequest;
 import lombok.extern.slf4j.Slf4j;
 import org.aspectj.lang.ProceedingJoinPoint;
 import org.aspectj.lang.annotation.Around;
 import org.aspectj.lang.annotation.Aspect;
 import org.aspectj.lang.annotation.Pointcut;
 import org.springframework.boot.autoconfigure.AutoConfiguration;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
-import org.springframework.web.context.request.RequestAttributes;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
 import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
 
-import javax.servlet.http.HttpServletRequest;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
@@ -23,10 +23,10 @@ import java.util.stream.Collectors;
  *
  * @author Uncarbon
  */
+@ConditionalOnExpression("${helio.web.logging.enabled:false}")
 @Aspect
-@Slf4j
 @AutoConfiguration
-@ConditionalOnProperty(prefix = "helio.web.logging", value = "enabled", havingValue = "true")
+@Slf4j
 public class WebLoggingAspect {
 
     /**
@@ -55,9 +55,9 @@ public class WebLoggingAspect {
      */
     @Around("restControllerPointcut() && applicationPackagePointcut()")
     public Object restControllerAround(ProceedingJoinPoint point) throws Throwable {
-        RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes();
+        ServletRequestAttributes requestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
         assert requestAttributes != null;
-        HttpServletRequest request = (HttpServletRequest) RequestContextHolder.getRequestAttributes();
+        HttpServletRequest request = requestAttributes.getRequest();
 
         recordRequest(point, request);
 

+ 4 - 3
helio-starter-web/src/main/java/cc/uncarbon/framework/web/config/GlobalWebExceptionHandlerAutoConfiguration.java

@@ -12,6 +12,7 @@ import cn.dev33.satoken.exception.NotLoginException;
 import cn.dev33.satoken.exception.NotPermissionException;
 import cn.dev33.satoken.exception.NotRoleException;
 import com.fasterxml.jackson.core.JsonParseException;
+import jakarta.servlet.http.HttpServletRequest;
 import lombok.NonNull;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
@@ -30,8 +31,8 @@ import org.springframework.web.bind.annotation.ResponseStatus;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.method.annotation.MethodArgumentTypeMismatchException;
 import org.springframework.web.servlet.NoHandlerFoundException;
+import org.springframework.web.servlet.resource.NoResourceFoundException;
 
-import javax.servlet.http.HttpServletRequest;
 import java.nio.charset.StandardCharsets;
 
 /**
@@ -132,8 +133,8 @@ public class GlobalWebExceptionHandlerAutoConfiguration {
      * 404 NOT FOUND
      */
     @ResponseStatus(HttpStatus.NOT_FOUND)
-    @ExceptionHandler({NoHandlerFoundException.class})
-    public ResponseEntity<ApiResult<Void>> handleNoHandlerFoundException(NoHandlerFoundException e, HttpServletRequest request) {
+    @ExceptionHandler({NoHandlerFoundException.class, NoResourceFoundException.class})
+    public ResponseEntity<ApiResult<Void>> handleNoHandlerFoundException(Exception e, HttpServletRequest request) {
         this.logError(e, request);
 
         GlobalWebExceptionI18nMessageEnum msgEnum = GlobalWebExceptionI18nMessageEnum.GLOBAL__NOT_FOUND;

+ 3 - 4
helio-starter-web/src/main/java/cc/uncarbon/framework/web/config/XssAutoConfiguration.java

@@ -2,15 +2,14 @@ package cc.uncarbon.framework.web.config;
 
 import cc.uncarbon.framework.core.props.HelioProperties;
 import cc.uncarbon.framework.web.xss.XssFilter;
+import jakarta.servlet.DispatcherType;
 import org.springframework.boot.autoconfigure.AutoConfiguration;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
 import org.springframework.boot.web.servlet.FilterRegistrationBean;
 import org.springframework.context.annotation.Bean;
 import org.springframework.core.Ordered;
 
-import javax.servlet.DispatcherType;
-
 /**
  * 反 XSS 注入自动配置类
  *
@@ -21,7 +20,7 @@ public class XssAutoConfiguration {
 
     @Bean
     @ConditionalOnMissingBean
-    @ConditionalOnProperty(value = "helio.security.xss.enabled", havingValue = "true", matchIfMissing = true)
+    @ConditionalOnExpression(value = "${helio.security.xss.enabled:true}")
     public FilterRegistrationBean<XssFilter> xssFilterRegistration(HelioProperties helioProperties) {
         FilterRegistrationBean<XssFilter> registration = new FilterRegistrationBean<>();
         registration.setDispatcherTypes(DispatcherType.REQUEST);

+ 3 - 3
helio-starter-web/src/main/java/cc/uncarbon/framework/web/model/request/IdsDTO.java

@@ -1,13 +1,13 @@
 package cc.uncarbon.framework.web.model.request;
 
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotEmpty;
 import lombok.AllArgsConstructor;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 import lombok.experimental.Accessors;
 import lombok.experimental.SuperBuilder;
 
-import javax.validation.constraints.NotEmpty;
 import java.io.Serializable;
 import java.util.List;
 
@@ -26,7 +26,7 @@ import java.util.List;
 @Data
 public class IdsDTO<T extends Serializable> implements Serializable {
 
-    @ApiModelProperty(value = "主键ID数组", required = true)
+    @Schema(description = "主键ID数组", requiredMode = Schema.RequiredMode.REQUIRED)
     @NotEmpty(message = "ids不能为空")
     private List<T> ids;
 

+ 4 - 4
helio-starter-web/src/main/java/cc/uncarbon/framework/web/model/response/ApiResult.java

@@ -4,7 +4,7 @@ import cc.uncarbon.framework.core.constant.HelioConstant;
 import cc.uncarbon.framework.core.enums.HelioBaseEnum;
 import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.http.HttpStatus;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.AllArgsConstructor;
 import lombok.Data;
 import lombok.NoArgsConstructor;
@@ -24,13 +24,13 @@ import java.io.Serializable;
 @Data
 public class ApiResult<T> implements Serializable {
 
-    @ApiModelProperty(value = "状态码")
+    @Schema(description = "状态码")
     private int code;
 
-    @ApiModelProperty(value = "返回消息")
+    @Schema(description = "返回消息")
     private String msg;
 
-    @ApiModelProperty(value = "承载数据")
+    @Schema(description = "承载数据")
     private T data;
 
     public static <T> ApiResult<T> success() {

+ 1 - 1
helio-starter-web/src/main/java/cc/uncarbon/framework/web/util/IPUtil.java

@@ -3,9 +3,9 @@ package cc.uncarbon.framework.web.util;
 import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.text.CharSequenceUtil;
 import cn.hutool.core.text.StrPool;
+import jakarta.servlet.http.HttpServletRequest;
 import lombok.experimental.UtilityClass;
 
-import javax.servlet.http.HttpServletRequest;
 import java.util.List;
 
 /**

+ 3 - 3
helio-starter-web/src/main/java/cc/uncarbon/framework/web/util/InvalidFieldUtil.java

@@ -2,7 +2,7 @@ package cc.uncarbon.framework.web.util;
 
 import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.text.CharSequenceUtil;
-import io.swagger.annotations.ApiModelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.AllArgsConstructor;
 import lombok.Data;
 import lombok.NoArgsConstructor;
@@ -90,10 +90,10 @@ public class InvalidFieldUtil {
     @Data
     public static class InvalidField {
 
-        @ApiModelProperty(value = "字段名")
+        @Schema(description = "字段名")
         private String fieldName;
 
-        @ApiModelProperty(value = "错误原因")
+        @Schema(description = "错误原因")
         private String message;
 
     }

+ 2 - 2
helio-starter-web/src/main/java/cc/uncarbon/framework/web/xss/XssFilter.java

@@ -1,11 +1,11 @@
 package cc.uncarbon.framework.web.xss;
 
 import cn.hutool.core.collection.CollUtil;
+import jakarta.servlet.*;
+import jakarta.servlet.http.HttpServletRequest;
 import lombok.RequiredArgsConstructor;
 import org.springframework.util.AntPathMatcher;
 
-import javax.servlet.*;
-import javax.servlet.http.HttpServletRequest;
 import java.io.IOException;
 import java.util.List;
 

+ 6 - 6
helio-starter-web/src/main/java/cc/uncarbon/framework/web/xss/XssHttpServletRequestWrapper.java

@@ -2,14 +2,14 @@ package cc.uncarbon.framework.web.xss;
 
 import cn.hutool.core.io.IoUtil;
 import cn.hutool.core.text.CharSequenceUtil;
+import jakarta.servlet.ReadListener;
+import jakarta.servlet.ServletInputStream;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletRequestWrapper;
 import lombok.Getter;
 import org.springframework.http.HttpHeaders;
 import org.springframework.http.MediaType;
 
-import javax.servlet.ReadListener;
-import javax.servlet.ServletInputStream;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletRequestWrapper;
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.nio.charset.StandardCharsets;
@@ -44,8 +44,8 @@ public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper {
      * 工具方法:获取最原始的request
      */
     public static HttpServletRequest getOrgRequest(HttpServletRequest request) {
-        if (request instanceof XssHttpServletRequestWrapper) {
-            return ((XssHttpServletRequestWrapper) request).getOrgRequest();
+        if (request instanceof XssHttpServletRequestWrapper xssHttpServletRequestWrapper) {
+            return xssHttpServletRequestWrapper.getOrgRequest();
         }
         return request;
     }

+ 33 - 64
pom.xml

@@ -25,55 +25,56 @@
     <parent>
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-starter-parent</artifactId>
-        <version>2.7.18</version>
+        <version>3.2.3</version>
         <relativePath/>
     </parent>
 
     <groupId>cc.uncarbon.framework</groupId>
     <artifactId>helio-starters</artifactId>
-    <version>1.11.0</version><!-- BATCH REPLACEMENT MARK -->
+    <version>2.0.0</version><!-- BATCH REPLACEMENT MARK -->
 
     <properties>
         <!-- core versions -->
-        <revision>1.11.0</revision>
+        <revision>2.0.0</revision>
         <helio-starters.version>${revision}</helio-starters.version>
-        <!-- 可根据实际JDK版本修改;JDK8则改为'1.8'  JDK11则改为'11'  JDK17则改为'17'  JDK21则改为'21' -->
-        <java.version>1.8</java.version>
+        <!-- 可根据实际JDK版本修改;JDK17则改为'17'  JDK21则改为'21' -->
+        <java.version>17</java.version>
         <!-- 若变更Spring Boot版本, 上面parent依赖版本也要变 -->
-        <spring-boot.version>2.7.18</spring-boot.version>
+        <spring-boot.version>3.2.3</spring-boot.version>
 
 
         <!-- Spring Cloud versions -->
         <!-- https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-dependencies -->
-        <spring-cloud.version>2021.0.7</spring-cloud.version>
-        <spring-cloud-starter-bootstrap.version>3.1.6</spring-cloud-starter-bootstrap.version>
+        <spring-cloud.version>2023.0.0</spring-cloud.version>
+        <spring-cloud-starter-bootstrap.version>4.1.1</spring-cloud-starter-bootstrap.version>
 
         <!-- Spring Cloud Alibaba versions -->
-        <spring-cloud-alibaba.version>2021.0.5.0</spring-cloud-alibaba.version>
-        <dubbo.version>3.1.10</dubbo.version>
-        <seata.vesion>1.5.2</seata.vesion>
-        <nacos-client.vesion>2.1.2</nacos-client.vesion>
+        <spring-cloud-alibaba.version>2023.0.0.0-RC1</spring-cloud-alibaba.version>
+        <dubbo.version>3.2.11</dubbo.version>
+        <seata.vesion>2.0.0</seata.vesion>
+        <nacos-client.vesion>2.3.0</nacos-client.vesion>
 
 
         <!-- 3rd-party versions -->
         <lombok.version>1.18.30</lombok.version>
-        <slf4j.version>1.7.36</slf4j.version>
+        <slf4j.version>2.0.12</slf4j.version>
         <hutool.version>5.8.25</hutool.version>
         <sa-token.version>1.37.0</sa-token.version>
-        <transmittable-thread-local.version>2.14.2</transmittable-thread-local.version>
+        <transmittable-thread-local.version>2.14.5</transmittable-thread-local.version>
         <!-- 如果 mp 较新版存在问题,可以回退至 3.5.3.1 或 3.5.4 试试  -->
         <mybatis-plus.version>3.5.5</mybatis-plus.version>
-        <knife4j.version>3.0.3</knife4j.version>
+        <knife4j.version>4.5.0</knife4j.version>
+        <springdoc-annotations.version>2.2.20</springdoc-annotations.version>
         <!-- https://mvnrepository.com/artifact/org.redisson/redisson-spring-boot-starter -->
-        <redisson.version>3.23.3</redisson.version>
+        <redisson.version>3.27.0</redisson.version>
         <aspectj.version>1.9.6</aspectj.version>
         <ons-client.version>1.8.8.1.Final</ons-client.version>
         <mybatis-plus-dynamic-datasource.version>3.5.2</mybatis-plus-dynamic-datasource.version>
 
 
         <!-- DB Driver versions -->
-        <mysql.version>8.0.28</mysql.version>
-        <postgresql.version>42.7.1</postgresql.version>
+        <mysql.version>8.3.0</mysql.version>
+        <postgresql.version>42.7.2</postgresql.version>
 
 
         <!-- Maven properties -->
@@ -90,10 +91,7 @@
 
         <!-- for mitigating vulnerabilities -->
         <guava.version>33.0.0-jre</guava.version>
-        <snakeyaml.version>1.33</snakeyaml.version>
-        <protobuf-java.version>3.25.1</protobuf-java.version>
-        <icu4j.version>74.2</icu4j.version>
-        <json-path.version>2.8.0</json-path.version>
+        <commons-compress.version>1.26.0</commons-compress.version>
     </properties>
 
     <!-- 全局使用 -->
@@ -122,30 +120,11 @@
             </dependency>
 
             <dependency>
-                <groupId>org.yaml</groupId>
-                <artifactId>snakeyaml</artifactId>
-                <version>${snakeyaml.version}</version>
+                <groupId>org.apache.commons</groupId>
+                <artifactId>commons-compress</artifactId>
+                <version>${commons-compress.version}</version>
             </dependency>
 
-            <dependency>
-                <groupId>com.google.protobuf</groupId>
-                <artifactId>protobuf-java</artifactId>
-                <version>${protobuf-java.version}</version>
-            </dependency>
-
-            <dependency>
-                <groupId>com.ibm.icu</groupId>
-                <artifactId>icu4j</artifactId>
-                <version>${icu4j.version}</version>
-            </dependency>
-
-            <dependency>
-                <groupId>com.jayway.jsonpath</groupId>
-                <artifactId>json-path</artifactId>
-                <version>${json-path.version}</version>
-            </dependency>
-
-
             <!-- sub starters -->
             <dependency>
                 <groupId>cc.uncarbon.framework</groupId>
@@ -323,8 +302,8 @@
             <!-- CRUD dependencies -->
             <!-- 常用数据库驱动 -->
             <dependency>
-                <groupId>mysql</groupId>
-                <artifactId>mysql-connector-java</artifactId>
+                <groupId>com.mysql</groupId>
+                <artifactId>mysql-connector-j</artifactId>
                 <version>${mysql.version}</version>
             </dependency>
 
@@ -336,7 +315,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>
 
@@ -364,13 +343,13 @@
             <!-- KNIFE4J dependencies -->
             <dependency>
                 <groupId>com.github.xiaoymin</groupId>
-                <artifactId>knife4j-annotations</artifactId>
+                <artifactId>knife4j-core</artifactId>
                 <version>${knife4j.version}</version>
             </dependency>
 
             <dependency>
                 <groupId>com.github.xiaoymin</groupId>
-                <artifactId>knife4j-spring-boot-starter</artifactId>
+                <artifactId>knife4j-openapi3-jakarta-spring-boot-starter</artifactId>
                 <version>${knife4j.version}</version>
                 <!-- 单体应用可以不要 guava,微服务应用通过 nacos-client 引入 guava -->
                 <exclusions>
@@ -381,10 +360,11 @@
                 </exclusions>
             </dependency>
 
+            <!-- SpringDoc 注解包-->
             <dependency>
-                <groupId>com.github.xiaoymin</groupId>
-                <artifactId>knife4j-micro-spring-boot-starter</artifactId>
-                <version>${knife4j.version}</version>
+                <groupId>io.swagger.core.v3</groupId>
+                <artifactId>swagger-annotations</artifactId>
+                <version>${springdoc-annotations.version}</version>
             </dependency>
 
 
@@ -402,20 +382,9 @@
                         <groupId>org.apache.maven.plugins</groupId>
                         <artifactId>maven-site-plugin</artifactId>
                     </exclusion>
-                    <!-- 移除其默认适配的 Spring Boot 3 -->
-                    <exclusion>
-                        <groupId>org.redisson</groupId>
-                        <artifactId>redisson-spring-data-31</artifactId>
-                    </exclusion>
                 </exclusions>
             </dependency>
 
-            <!-- 适配 Spring Boot 2.7 -->
-            <dependency>
-                <groupId>org.redisson</groupId>
-                <artifactId>redisson-spring-data-27</artifactId>
-                <version>${redisson.version}</version>
-            </dependency>
 
             <!-- ROCKETMQ-ALIYUN dependencies -->
             <dependency>
@@ -428,7 +397,7 @@
             <!-- SA-TOKEN dependencies -->
             <dependency>
                 <groupId>cn.dev33</groupId>
-                <artifactId>sa-token-spring-boot-starter</artifactId>
+                <artifactId>sa-token-spring-boot3-starter</artifactId>
                 <version>${sa-token.version}</version>
             </dependency>