Commit da36b1bf8f1d78a74783aacd812836c6efff0cef
1 parent
ea4fa685
chore: 升级依赖并切换 WxJava 到 HttpClient5
升级 Spring Boot 3.5.15、Netty、Redisson、Tika、Hutool、jsch、AWS SDK、Alipay、weixin-java 等依赖。 - easy-trans 迁移到 org.dromara 并同步 Java import - 新增 system 侧 WxJava 配置类,绕过 httpclient4 provided 依赖问题 - 将 WxJava http-client-type 切换为 HttpComponents - 移除显式 httpclient4 依赖
Showing
25 changed files
with
173 additions
and
55 deletions
.gitignore
pom.xml
| ... | ... | @@ -46,7 +46,7 @@ |
| 46 | 46 | <flatten-maven-plugin.version>1.7.2</flatten-maven-plugin.version> |
| 47 | 47 | <!-- maven-surefire-plugin 暂时无法通过 bom 的依赖读取(兼容老版本 IDEA 2024 及以前版本) --> |
| 48 | 48 | <lombok.version>1.18.42</lombok.version> |
| 49 | - <spring.boot.version>3.5.9</spring.boot.version> | |
| 49 | + <spring.boot.version>3.5.15</spring.boot.version> | |
| 50 | 50 | <mapstruct.version>1.6.3</mapstruct.version> |
| 51 | 51 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
| 52 | 52 | </properties> | ... | ... |
yudao-dependencies/pom.xml
| ... | ... | @@ -17,7 +17,7 @@ |
| 17 | 17 | <revision>2026.05-SNAPSHOT</revision> |
| 18 | 18 | <flatten-maven-plugin.version>1.7.2</flatten-maven-plugin.version> |
| 19 | 19 | <!-- 统一依赖管理 --> |
| 20 | - <spring.boot.version>3.5.14</spring.boot.version> | |
| 20 | + <spring.boot.version>3.5.15</spring.boot.version> | |
| 21 | 21 | <!-- Web 相关 --> |
| 22 | 22 | <springdoc.version>2.8.17</springdoc.version> |
| 23 | 23 | <knife4j.version>4.5.0</knife4j.version> |
| ... | ... | @@ -27,23 +27,23 @@ |
| 27 | 27 | <mybatis-plus.version>3.5.16</mybatis-plus.version> |
| 28 | 28 | <mybatis-plus-join.version>1.5.7</mybatis-plus-join.version> |
| 29 | 29 | <dynamic-datasource.version>4.5.0</dynamic-datasource.version> |
| 30 | - <easy-trans.version>3.0.6</easy-trans.version> | |
| 31 | - <redisson.version>4.4.0</redisson.version> | |
| 30 | + <easy-trans.version>3.1.5</easy-trans.version> | |
| 31 | + <redisson.version>4.6.1</redisson.version> | |
| 32 | 32 | <dm8.jdbc.version>8.1.3.140</dm8.jdbc.version> |
| 33 | 33 | <kingbase.jdbc.version>9.0.1.jre7</kingbase.jdbc.version> |
| 34 | 34 | <opengauss.jdbc.version>7.0.0-RC3-og</opengauss.jdbc.version> |
| 35 | - <taos.version>3.8.3</taos.version> | |
| 35 | + <taos.version>3.8.4</taos.version> | |
| 36 | 36 | <!-- 消息队列 --> |
| 37 | - <rocketmq-spring.version>2.3.5</rocketmq-spring.version> | |
| 37 | + <rocketmq-spring.version>2.3.6</rocketmq-spring.version> | |
| 38 | 38 | <!-- 服务保障相关 --> |
| 39 | 39 | <lock4j.version>2.2.7</lock4j.version> |
| 40 | 40 | <!-- 监控相关 --> |
| 41 | 41 | <skywalking.version>9.6.0</skywalking.version> |
| 42 | - <spring-boot-admin.version>3.5.8</spring-boot-admin.version> | |
| 42 | + <spring-boot-admin.version>3.5.9</spring-boot-admin.version> | |
| 43 | 43 | <opentracing.version>0.33.0</opentracing.version> |
| 44 | 44 | <!-- Test 测试相关 --> |
| 45 | 45 | <podam.version>8.0.2.RELEASE</podam.version> |
| 46 | - <jedis-mock.version>1.1.12</jedis-mock.version> | |
| 46 | + <jedis-mock.version>1.1.15</jedis-mock.version> | |
| 47 | 47 | <mockito-inline.version>5.2.0</mockito-inline.version> |
| 48 | 48 | <!-- Bpm 工作流相关 --> |
| 49 | 49 | <flowable.version>8.0.0</flowable.version> |
| ... | ... | @@ -54,35 +54,35 @@ |
| 54 | 54 | <pinyin4j.version>2.5.1</pinyin4j.version> |
| 55 | 55 | <lombok.version>1.18.46</lombok.version> |
| 56 | 56 | <mapstruct.version>1.6.3</mapstruct.version> |
| 57 | - <hutool-5.version>5.8.44</hutool-5.version> | |
| 57 | + <hutool-5.version>5.8.46</hutool-5.version> | |
| 58 | 58 | <hutool-6.version>6.0.0-M22</hutool-6.version> |
| 59 | 59 | <fastexcel.version>1.3.0</fastexcel.version> |
| 60 | 60 | <velocity.version>2.4.1</velocity.version> |
| 61 | 61 | <fastjson.version>1.2.83</fastjson.version> |
| 62 | - <fastjson2.version>2.0.61</fastjson2.version> | |
| 62 | + <fastjson2.version>2.0.62</fastjson2.version> | |
| 63 | 63 | <guava.version>33.6.0-jre</guava.version> |
| 64 | 64 | <transmittable-thread-local.version>2.14.5</transmittable-thread-local.version> |
| 65 | 65 | <commons-net.version>3.13.0</commons-net.version> |
| 66 | 66 | <commons-lang3.version>3.20.0</commons-lang3.version> |
| 67 | - <jsch.version>2.28.2</jsch.version> | |
| 68 | - <tika-core.version>3.3.0</tika-core.version> | |
| 67 | + <jsch.version>2.28.3</jsch.version> | |
| 68 | + <tika-core.version>3.3.1</tika-core.version> | |
| 69 | 69 | <ip2region.version>2.7.0</ip2region.version> |
| 70 | 70 | <bizlog-sdk.version>3.0.6</bizlog-sdk.version> |
| 71 | - <netty.version>4.2.14.Final</netty.version> | |
| 71 | + <netty.version>4.2.15.Final</netty.version> | |
| 72 | 72 | <mqtt.version>1.2.5</mqtt.version> |
| 73 | 73 | <vertx.version>4.5.26</vertx.version> |
| 74 | 74 | <okhttp.version>4.12.0</okhttp.version> |
| 75 | 75 | <californium.version>3.14.0</californium.version> |
| 76 | 76 | <j2mod.version>3.3.0</j2mod.version> |
| 77 | 77 | <!-- 三方云服务相关 --> |
| 78 | - <awssdk.version>2.44.0</awssdk.version> | |
| 78 | + <awssdk.version>2.46.17</awssdk.version> | |
| 79 | 79 | <justauth.version>1.16.7</justauth.version> |
| 80 | 80 | <justauth-starter.version>1.4.0</justauth-starter.version> |
| 81 | 81 | <jimureport.version>2.3.4</jimureport.version> |
| 82 | 82 | <jimubi.version>2.3.2</jimubi.version> |
| 83 | - <weixin-java.version>4.8.2-20260501.180637</weixin-java.version> | |
| 83 | + <weixin-java.version>4.8.4-20260623.211820</weixin-java.version> | |
| 84 | 84 | <bouncycastle.version>1.80</bouncycastle.version> |
| 85 | - <alipay-sdk-java.version>4.40.806.ALL</alipay-sdk-java.version> | |
| 85 | + <alipay-sdk-java.version>4.40.865.ALL</alipay-sdk-java.version> | |
| 86 | 86 | </properties> |
| 87 | 87 | |
| 88 | 88 | <dependencyManagement> |
| ... | ... | @@ -220,7 +220,7 @@ |
| 220 | 220 | </dependency> |
| 221 | 221 | |
| 222 | 222 | <dependency> |
| 223 | - <groupId>com.fhs-opensource</groupId> <!-- VO 数据翻译 --> | |
| 223 | + <groupId>org.dromara</groupId> <!-- VO 数据翻译 --> | |
| 224 | 224 | <artifactId>easy-trans-spring-boot-starter</artifactId> |
| 225 | 225 | <version>${easy-trans.version}</version> |
| 226 | 226 | <exclusions> |
| ... | ... | @@ -235,12 +235,12 @@ |
| 235 | 235 | </exclusions> |
| 236 | 236 | </dependency> |
| 237 | 237 | <dependency> |
| 238 | - <groupId>com.fhs-opensource</groupId> | |
| 238 | + <groupId>org.dromara</groupId> | |
| 239 | 239 | <artifactId>easy-trans-mybatis-plus-extend</artifactId> |
| 240 | 240 | <version>${easy-trans.version}</version> |
| 241 | 241 | </dependency> |
| 242 | 242 | <dependency> |
| 243 | - <groupId>com.fhs-opensource</groupId> | |
| 243 | + <groupId>org.dromara</groupId> | |
| 244 | 244 | <artifactId>easy-trans-anno</artifactId> |
| 245 | 245 | <version>${easy-trans.version}</version> |
| 246 | 246 | </dependency> | ... | ... |
yudao-framework/yudao-common/pom.xml
| ... | ... | @@ -134,7 +134,7 @@ |
| 134 | 134 | </dependency> |
| 135 | 135 | |
| 136 | 136 | <dependency> |
| 137 | - <groupId>com.fhs-opensource</groupId> <!-- VO 数据翻译 --> | |
| 137 | + <groupId>org.dromara</groupId> <!-- VO 数据翻译 --> | |
| 138 | 138 | <artifactId>easy-trans-anno</artifactId> <!-- 默认引入的原因,方便 xxx-module-api 包使用 --> |
| 139 | 139 | </dependency> |
| 140 | 140 | ... | ... |
yudao-framework/yudao-spring-boot-starter-biz-data-permission/src/main/java/cn/iocoder/yudao/framework/datapermission/core/rule/DataPermissionRuleFactoryImpl.java
| ... | ... | @@ -4,7 +4,7 @@ import cn.hutool.core.collection.CollUtil; |
| 4 | 4 | import cn.hutool.core.util.ArrayUtil; |
| 5 | 5 | import cn.iocoder.yudao.framework.datapermission.core.annotation.DataPermission; |
| 6 | 6 | import cn.iocoder.yudao.framework.datapermission.core.aop.DataPermissionContextHolder; |
| 7 | -import com.fhs.trans.service.impl.SimpleTransService; | |
| 7 | +import org.dromara.trans.service.impl.SimpleTransService; | |
| 8 | 8 | import lombok.RequiredArgsConstructor; |
| 9 | 9 | |
| 10 | 10 | import java.util.Collections; |
| ... | ... | @@ -65,7 +65,7 @@ public class DataPermissionRuleFactoryImpl implements DataPermissionRuleFactory |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | /** |
| 68 | - * 判断是否为数据翻译 {@link com.fhs.core.trans.anno.Trans} 的调用 | |
| 68 | + * 判断是否为数据翻译 {@link org.dromara.core.trans.anno.Trans} 的调用 | |
| 69 | 69 | * |
| 70 | 70 | * 目前暂时只有这个办法,已经和 easy-trans 做过沟通 |
| 71 | 71 | * | ... | ... |
yudao-framework/yudao-spring-boot-starter-mybatis/pom.xml
| ... | ... | @@ -98,11 +98,11 @@ |
| 98 | 98 | </dependency> |
| 99 | 99 | |
| 100 | 100 | <dependency> |
| 101 | - <groupId>com.fhs-opensource</groupId> <!-- VO 数据翻译 --> | |
| 101 | + <groupId>org.dromara</groupId> <!-- VO 数据翻译 --> | |
| 102 | 102 | <artifactId>easy-trans-spring-boot-starter</artifactId> |
| 103 | 103 | </dependency> |
| 104 | 104 | <dependency> |
| 105 | - <groupId>com.fhs-opensource</groupId> | |
| 105 | + <groupId>org.dromara</groupId> | |
| 106 | 106 | <artifactId>easy-trans-mybatis-plus-extend</artifactId> |
| 107 | 107 | </dependency> |
| 108 | 108 | ... | ... |
yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/core/dataobject/BaseDO.java
| ... | ... | @@ -4,7 +4,7 @@ import com.baomidou.mybatisplus.annotation.FieldFill; |
| 4 | 4 | import com.baomidou.mybatisplus.annotation.TableField; |
| 5 | 5 | import com.baomidou.mybatisplus.annotation.TableLogic; |
| 6 | 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
| 7 | -import com.fhs.core.trans.vo.TransPojo; | |
| 7 | +import org.dromara.core.trans.vo.TransPojo; | |
| 8 | 8 | import lombok.Data; |
| 9 | 9 | import org.apache.ibatis.type.JdbcType; |
| 10 | 10 | ... | ... |
yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/translate/config/YudaoTranslateAutoConfiguration.java
| 1 | 1 | package cn.iocoder.yudao.framework.translate.config; |
| 2 | 2 | |
| 3 | 3 | import cn.iocoder.yudao.framework.translate.core.TranslateUtils; |
| 4 | -import com.fhs.trans.service.impl.TransService; | |
| 4 | +import org.dromara.trans.service.impl.TransService; | |
| 5 | 5 | import org.springframework.boot.autoconfigure.AutoConfiguration; |
| 6 | 6 | import org.springframework.context.annotation.Bean; |
| 7 | 7 | |
| ... | ... | @@ -9,7 +9,7 @@ import org.springframework.context.annotation.Bean; |
| 9 | 9 | public class YudaoTranslateAutoConfiguration { |
| 10 | 10 | |
| 11 | 11 | @Bean |
| 12 | - @SuppressWarnings({"InstantiationOfUtilityClass", "SpringJavaInjectionPointsAutowiringInspection"}) | |
| 12 | + @SuppressWarnings("InstantiationOfUtilityClass") | |
| 13 | 13 | public TranslateUtils translateUtils(TransService transService) { |
| 14 | 14 | TranslateUtils.init(transService); |
| 15 | 15 | return new TranslateUtils(); | ... | ... |
yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/translate/core/TranslateUtils.java
| 1 | 1 | package cn.iocoder.yudao.framework.translate.core; |
| 2 | 2 | |
| 3 | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | -import com.fhs.core.trans.vo.VO; | |
| 5 | -import com.fhs.trans.service.impl.TransService; | |
| 4 | +import org.dromara.core.trans.vo.VO; | |
| 5 | +import org.dromara.trans.service.impl.TransService; | |
| 6 | 6 | |
| 7 | 7 | import java.util.List; |
| 8 | 8 | ... | ... |
yudao-module-ai/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/AiChatConversationController.java
| ... | ... | @@ -12,7 +12,7 @@ import cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation.AiChatCo |
| 12 | 12 | import cn.iocoder.yudao.module.ai.dal.dataobject.chat.AiChatConversationDO; |
| 13 | 13 | import cn.iocoder.yudao.module.ai.service.chat.AiChatConversationService; |
| 14 | 14 | import cn.iocoder.yudao.module.ai.service.chat.AiChatMessageService; |
| 15 | -import com.fhs.core.trans.anno.TransMethodResult; | |
| 15 | +import org.dromara.core.trans.anno.TransMethodResult; | |
| 16 | 16 | import io.swagger.v3.oas.annotations.Operation; |
| 17 | 17 | import io.swagger.v3.oas.annotations.Parameter; |
| 18 | 18 | import io.swagger.v3.oas.annotations.tags.Tag; | ... | ... |
yudao-module-ai/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/vo/conversation/AiChatConversationRespVO.java
| ... | ... | @@ -2,9 +2,9 @@ package cn.iocoder.yudao.module.ai.controller.admin.chat.vo.conversation; |
| 2 | 2 | |
| 3 | 3 | import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiModelDO; |
| 4 | 4 | import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; |
| 5 | -import com.fhs.core.trans.anno.Trans; | |
| 6 | -import com.fhs.core.trans.constant.TransType; | |
| 7 | -import com.fhs.core.trans.vo.VO; | |
| 5 | +import org.dromara.core.trans.anno.Trans; | |
| 6 | +import org.dromara.core.trans.constant.TransType; | |
| 7 | +import org.dromara.core.trans.vo.VO; | |
| 8 | 8 | import io.swagger.v3.oas.annotations.media.Schema; |
| 9 | 9 | import lombok.Data; |
| 10 | 10 | ... | ... |
yudao-module-ai/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/AiChatRoleController.java
| ... | ... | @@ -10,7 +10,7 @@ import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatRole.AiChatRoleS |
| 10 | 10 | import cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatRole.AiChatRoleSaveReqVO; |
| 11 | 11 | import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiChatRoleDO; |
| 12 | 12 | import cn.iocoder.yudao.module.ai.service.model.AiChatRoleService; |
| 13 | -import com.fhs.core.trans.anno.TransMethodResult; | |
| 13 | +import org.dromara.core.trans.anno.TransMethodResult; | |
| 14 | 14 | import io.swagger.v3.oas.annotations.Operation; |
| 15 | 15 | import io.swagger.v3.oas.annotations.Parameter; |
| 16 | 16 | import io.swagger.v3.oas.annotations.tags.Tag; | ... | ... |
yudao-module-ai/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/model/vo/chatRole/AiChatRoleRespVO.java
| 1 | 1 | package cn.iocoder.yudao.module.ai.controller.admin.model.vo.chatRole; |
| 2 | 2 | |
| 3 | 3 | import cn.iocoder.yudao.module.ai.dal.dataobject.model.AiModelDO; |
| 4 | -import com.fhs.core.trans.anno.Trans; | |
| 5 | -import com.fhs.core.trans.constant.TransType; | |
| 6 | -import com.fhs.core.trans.vo.VO; | |
| 4 | +import org.dromara.core.trans.anno.Trans; | |
| 5 | +import org.dromara.core.trans.constant.TransType; | |
| 6 | +import org.dromara.core.trans.vo.VO; | |
| 7 | 7 | import io.swagger.v3.oas.annotations.media.Schema; |
| 8 | 8 | import lombok.Data; |
| 9 | 9 | ... | ... |
yudao-module-crm/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/product/CrmProductController.java
| ... | ... | @@ -14,7 +14,7 @@ import cn.iocoder.yudao.module.crm.dal.dataobject.product.CrmProductDO; |
| 14 | 14 | import cn.iocoder.yudao.module.crm.enums.product.CrmProductStatusEnum; |
| 15 | 15 | import cn.iocoder.yudao.module.crm.service.product.CrmProductService; |
| 16 | 16 | import cn.iocoder.yudao.module.system.api.user.AdminUserApi; |
| 17 | -import com.fhs.core.trans.anno.TransMethodResult; | |
| 17 | +import org.dromara.core.trans.anno.TransMethodResult; | |
| 18 | 18 | import io.swagger.v3.oas.annotations.Operation; |
| 19 | 19 | import io.swagger.v3.oas.annotations.Parameter; |
| 20 | 20 | import io.swagger.v3.oas.annotations.tags.Tag; | ... | ... |
yudao-module-crm/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/product/vo/product/CrmProductRespVO.java
| ... | ... | @@ -6,9 +6,9 @@ import cn.iocoder.yudao.module.crm.dal.dataobject.product.CrmProductCategoryDO; |
| 6 | 6 | import cn.iocoder.yudao.module.crm.enums.DictTypeConstants; |
| 7 | 7 | import cn.idev.excel.annotation.ExcelIgnoreUnannotated; |
| 8 | 8 | import cn.idev.excel.annotation.ExcelProperty; |
| 9 | -import com.fhs.core.trans.anno.Trans; | |
| 10 | -import com.fhs.core.trans.constant.TransType; | |
| 11 | -import com.fhs.core.trans.vo.VO; | |
| 9 | +import org.dromara.core.trans.anno.Trans; | |
| 10 | +import org.dromara.core.trans.constant.TransType; | |
| 11 | +import org.dromara.core.trans.vo.VO; | |
| 12 | 12 | import io.swagger.v3.oas.annotations.media.Schema; |
| 13 | 13 | import lombok.Data; |
| 14 | 14 | ... | ... |
yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/controller/admin/ota/vo/firmware/IotOtaFirmwareRespVO.java
yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/controller/admin/ota/vo/task/IotOtaTaskRespVO.java
yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/api/logger/OperateLogApiImpl.java
| ... | ... | @@ -7,7 +7,7 @@ import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogPageReqDTO; |
| 7 | 7 | import cn.iocoder.yudao.module.system.api.logger.dto.OperateLogRespDTO; |
| 8 | 8 | import cn.iocoder.yudao.module.system.dal.dataobject.logger.OperateLogDO; |
| 9 | 9 | import cn.iocoder.yudao.module.system.service.logger.OperateLogService; |
| 10 | -import com.fhs.core.trans.anno.TransMethodResult; | |
| 10 | +import org.dromara.core.trans.anno.TransMethodResult; | |
| 11 | 11 | import jakarta.annotation.Resource; |
| 12 | 12 | import org.springframework.stereotype.Service; |
| 13 | 13 | import org.springframework.validation.annotation.Validated; | ... | ... |
yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/OperateLogRespDTO.java
| 1 | 1 | package cn.iocoder.yudao.module.system.api.logger.dto; |
| 2 | 2 | |
| 3 | -import com.fhs.core.trans.anno.Trans; | |
| 4 | -import com.fhs.core.trans.constant.TransType; | |
| 5 | -import com.fhs.core.trans.vo.VO; | |
| 3 | +import org.dromara.core.trans.anno.Trans; | |
| 4 | +import org.dromara.core.trans.constant.TransType; | |
| 5 | +import org.dromara.core.trans.vo.VO; | |
| 6 | 6 | import lombok.Data; |
| 7 | 7 | |
| 8 | 8 | import java.time.LocalDateTime; | ... | ... |
yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/OperateLogController.java
| ... | ... | @@ -11,7 +11,7 @@ import cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog.Oper |
| 11 | 11 | import cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog.OperateLogRespVO; |
| 12 | 12 | import cn.iocoder.yudao.module.system.dal.dataobject.logger.OperateLogDO; |
| 13 | 13 | import cn.iocoder.yudao.module.system.service.logger.OperateLogService; |
| 14 | -import com.fhs.core.trans.anno.TransMethodResult; | |
| 14 | +import org.dromara.core.trans.anno.TransMethodResult; | |
| 15 | 15 | import io.swagger.v3.oas.annotations.Operation; |
| 16 | 16 | import io.swagger.v3.oas.annotations.Parameter; |
| 17 | 17 | import io.swagger.v3.oas.annotations.tags.Tag; | ... | ... |
yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogRespVO.java
| ... | ... | @@ -5,9 +5,9 @@ import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO; |
| 5 | 5 | import cn.idev.excel.annotation.ExcelIgnoreUnannotated; |
| 6 | 6 | import cn.idev.excel.annotation.ExcelProperty; |
| 7 | 7 | import cn.iocoder.yudao.module.system.enums.DictTypeConstants; |
| 8 | -import com.fhs.core.trans.anno.Trans; | |
| 9 | -import com.fhs.core.trans.constant.TransType; | |
| 10 | -import com.fhs.core.trans.vo.VO; | |
| 8 | +import org.dromara.core.trans.anno.Trans; | |
| 9 | +import org.dromara.core.trans.constant.TransType; | |
| 10 | +import org.dromara.core.trans.vo.VO; | |
| 11 | 11 | import io.swagger.v3.oas.annotations.media.Schema; |
| 12 | 12 | import jakarta.validation.constraints.NotEmpty; |
| 13 | 13 | import lombok.Data; | ... | ... |
yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/framework/weixin/config/YudaoWxClientConfiguration.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.framework.weixin.config; | |
| 2 | + | |
| 3 | +import cn.binarywang.wx.miniapp.config.WxMaConfig; | |
| 4 | +import cn.binarywang.wx.miniapp.config.impl.WxMaDefaultConfigImpl; | |
| 5 | +import cn.binarywang.wx.miniapp.config.impl.WxMaRedisBetterConfigImpl; | |
| 6 | +import com.binarywang.spring.starter.wxjava.miniapp.properties.WxMaProperties; | |
| 7 | +import com.binarywang.spring.starter.wxjava.mp.properties.WxMpProperties; | |
| 8 | +import lombok.extern.slf4j.Slf4j; | |
| 9 | +import me.chanjar.weixin.common.redis.RedisTemplateWxRedisOps; | |
| 10 | +import me.chanjar.weixin.common.redis.WxRedisOps; | |
| 11 | +import me.chanjar.weixin.mp.config.WxMpConfigStorage; | |
| 12 | +import me.chanjar.weixin.mp.config.WxMpHostConfig; | |
| 13 | +import me.chanjar.weixin.mp.config.impl.WxMpDefaultConfigImpl; | |
| 14 | +import me.chanjar.weixin.mp.config.impl.WxMpRedisConfigImpl; | |
| 15 | +import org.apache.commons.lang3.StringUtils; | |
| 16 | +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; | |
| 17 | +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; | |
| 18 | +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; | |
| 19 | +import org.springframework.context.ApplicationContext; | |
| 20 | +import org.springframework.context.annotation.Bean; | |
| 21 | +import org.springframework.context.annotation.Configuration; | |
| 22 | +import org.springframework.data.redis.core.StringRedisTemplate; | |
| 23 | + | |
| 24 | +/** | |
| 25 | + * 微信公众号、小程序(weixin-java)的配置类 | |
| 26 | + * | |
| 27 | + * weixin-java 4.8.x 的 {@code AbstractWxMpConfigStorageConfiguration} / {@code AbstractWxMaConfigStorageConfiguration} | |
| 28 | + * 在初始化 config storage 时,会无条件调用 {@code DefaultApacheHttpClientBuilder.get()},后者在类加载时引用 | |
| 29 | + * Apache HttpClient 4.x 的 {@code org.apache.http.ssl.TrustStrategy} 等类,导致启动报 | |
| 30 | + * {@code NoClassDefFoundError}(Spring Boot 4.x / 新版 Spring Cloud Alibaba 不再传递 HttpClient 4.x)。 | |
| 31 | + * | |
| 32 | + * 本配置类自行创建 {@link WxMpConfigStorage} / {@link WxMaConfig} bean,绕过官方的初始化逻辑, | |
| 33 | + * 配合 {@code http-client-type: HttpComponents} 配置,只依赖 Apache HttpClient 5.x。 | |
| 34 | + * | |
| 35 | + * @author 芋道源码 | |
| 36 | + */ | |
| 37 | +@Configuration(proxyBeanMethods = false) | |
| 38 | +@Slf4j | |
| 39 | +public class YudaoWxClientConfiguration { | |
| 40 | + | |
| 41 | + @Bean | |
| 42 | + @ConditionalOnProperty(prefix = WxMpProperties.PREFIX + ".config-storage", name = "type", havingValue = "redistemplate") | |
| 43 | + @ConditionalOnClass(StringRedisTemplate.class) | |
| 44 | + @ConditionalOnMissingBean(WxMpConfigStorage.class) | |
| 45 | + public WxMpConfigStorage wxMpConfigStorage(WxMpProperties properties, ApplicationContext applicationContext) { | |
| 46 | + StringRedisTemplate redisTemplate = applicationContext.getBean(StringRedisTemplate.class); | |
| 47 | + WxRedisOps redisOps = new RedisTemplateWxRedisOps(redisTemplate); | |
| 48 | + WxMpRedisConfigImpl config = new WxMpRedisConfigImpl(redisOps, properties.getConfigStorage().getKeyPrefix()); | |
| 49 | + applyWxMpConfig(config, properties); | |
| 50 | + return config; | |
| 51 | + } | |
| 52 | + | |
| 53 | + @Bean | |
| 54 | + @ConditionalOnProperty(prefix = WxMaProperties.PREFIX + ".config-storage", name = "type", havingValue = "redistemplate") | |
| 55 | + @ConditionalOnClass(StringRedisTemplate.class) | |
| 56 | + @ConditionalOnMissingBean(WxMaConfig.class) | |
| 57 | + public WxMaConfig wxMaConfig(WxMaProperties properties, ApplicationContext applicationContext) { | |
| 58 | + StringRedisTemplate redisTemplate = applicationContext.getBean(StringRedisTemplate.class); | |
| 59 | + WxRedisOps redisOps = new RedisTemplateWxRedisOps(redisTemplate); | |
| 60 | + WxMaRedisBetterConfigImpl config = new WxMaRedisBetterConfigImpl(redisOps, properties.getConfigStorage().getKeyPrefix()); | |
| 61 | + applyWxMaConfig(config, properties); | |
| 62 | + return config; | |
| 63 | + } | |
| 64 | + | |
| 65 | + private void applyWxMpConfig(WxMpDefaultConfigImpl config, WxMpProperties properties) { | |
| 66 | + config.setAppId(properties.getAppId()); | |
| 67 | + config.setSecret(properties.getSecret()); | |
| 68 | + config.setToken(properties.getToken()); | |
| 69 | + config.setAesKey(properties.getAesKey()); | |
| 70 | + config.setUseStableAccessToken(properties.isUseStableAccessToken()); | |
| 71 | + | |
| 72 | + WxMpProperties.ConfigStorage storage = properties.getConfigStorage(); | |
| 73 | + config.setHttpProxyHost(storage.getHttpProxyHost()); | |
| 74 | + config.setHttpProxyUsername(storage.getHttpProxyUsername()); | |
| 75 | + config.setHttpProxyPassword(storage.getHttpProxyPassword()); | |
| 76 | + if (storage.getHttpProxyPort() != null) { | |
| 77 | + config.setHttpProxyPort(storage.getHttpProxyPort()); | |
| 78 | + } | |
| 79 | + | |
| 80 | + if (properties.getHosts() != null && StringUtils.isNotEmpty(properties.getHosts().getApiHost())) { | |
| 81 | + WxMpHostConfig hostConfig = new WxMpHostConfig(); | |
| 82 | + hostConfig.setApiHost(properties.getHosts().getApiHost()); | |
| 83 | + hostConfig.setOpenHost(properties.getHosts().getOpenHost()); | |
| 84 | + hostConfig.setMpHost(properties.getHosts().getMpHost()); | |
| 85 | + config.setHostConfig(hostConfig); | |
| 86 | + } | |
| 87 | + } | |
| 88 | + | |
| 89 | + private void applyWxMaConfig(WxMaDefaultConfigImpl config, WxMaProperties properties) { | |
| 90 | + WxMaProperties.ConfigStorage storage = properties.getConfigStorage(); | |
| 91 | + config.setAppid(StringUtils.trimToNull(properties.getAppid())); | |
| 92 | + config.setSecret(StringUtils.trimToNull(properties.getSecret())); | |
| 93 | + config.setToken(StringUtils.trimToNull(properties.getToken())); | |
| 94 | + config.setAesKey(StringUtils.trimToNull(properties.getAesKey())); | |
| 95 | + config.setMsgDataFormat(StringUtils.trimToNull(properties.getMsgDataFormat())); | |
| 96 | + config.useStableAccessToken(properties.isUseStableAccessToken()); | |
| 97 | + config.setApiHostUrl(StringUtils.trimToNull(properties.getApiHostUrl())); | |
| 98 | + config.setAccessTokenUrl(StringUtils.trimToNull(properties.getAccessTokenUrl())); | |
| 99 | + | |
| 100 | + config.setHttpProxyHost(storage.getHttpProxyHost()); | |
| 101 | + config.setHttpProxyUsername(storage.getHttpProxyUsername()); | |
| 102 | + config.setHttpProxyPassword(storage.getHttpProxyPassword()); | |
| 103 | + if (storage.getHttpProxyPort() != null) { | |
| 104 | + config.setHttpProxyPort(storage.getHttpProxyPort()); | |
| 105 | + } | |
| 106 | + | |
| 107 | + config.setRetrySleepMillis(Math.max(storage.getRetrySleepMillis(), 1000)); | |
| 108 | + config.setMaxRetryTimes(Math.max(storage.getMaxRetryTimes(), 0)); | |
| 109 | + } | |
| 110 | + | |
| 111 | +} | ... | ... |
yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/framework/weixin/package-info.java
0 → 100644
yudao-server/src/main/resources/application-dev.yaml
| ... | ... | @@ -158,14 +158,14 @@ wx: # 参见 https://github.com/Wechat-Group/WxJava/blob/develop/spring-boot-sta |
| 158 | 158 | config-storage: |
| 159 | 159 | type: RedisTemplate # 采用 RedisTemplate 操作 Redis,会自动从 Spring 中获取 |
| 160 | 160 | key-prefix: wx # Redis Key 的前缀 |
| 161 | - http-client-type: HttpClient # 采用 HttpClient 请求微信公众号平台 | |
| 161 | + http-client-type: HttpComponents # 采用 HttpComponents(HttpClient 5)请求微信公众号平台 | |
| 162 | 162 | miniapp: # 小程序配置(必填),参见 https://github.com/Wechat-Group/WxJava/blob/develop/spring-boot-starters/wx-java-miniapp-spring-boot-starter/README.md 文档 |
| 163 | 163 | appid: wx63c280fe3248a3e7 |
| 164 | 164 | secret: 6f270509224a7ae1296bbf1c8cb97aed |
| 165 | 165 | config-storage: |
| 166 | 166 | type: RedisTemplate # 采用 RedisTemplate 操作 Redis,会自动从 Spring 中获取 |
| 167 | 167 | key-prefix: wa # Redis Key 的前缀 |
| 168 | - http-client-type: HttpClient # 采用 HttpClient 请求微信公众号平台 | |
| 168 | + http-client-type: HttpComponents # 采用 HttpComponents(HttpClient 5)请求微信公众号平台 | |
| 169 | 169 | |
| 170 | 170 | --- #################### 芋道相关配置 #################### |
| 171 | 171 | ... | ... |
yudao-server/src/main/resources/application-local.yaml
| ... | ... | @@ -215,7 +215,7 @@ wx: |
| 215 | 215 | config-storage: |
| 216 | 216 | type: RedisTemplate # 采用 RedisTemplate 操作 Redis,会自动从 Spring 中获取 |
| 217 | 217 | key-prefix: wx # Redis Key 的前缀 |
| 218 | - http-client-type: HttpClient # 采用 HttpClient 请求微信公众号平台 | |
| 218 | + http-client-type: HttpComponents # 采用 HttpComponents(HttpClient 5)请求微信公众号平台 | |
| 219 | 219 | miniapp: # 小程序配置(必填),参见 https://github.com/Wechat-Group/WxJava/blob/develop/spring-boot-starters/wx-java-miniapp-spring-boot-starter/README.md 文档 |
| 220 | 220 | # appid: wx62056c0d5e8db250 # 测试号(牛希尧提供的) |
| 221 | 221 | # secret: 333ae72f41552af1e998fe1f54e1584a |
| ... | ... | @@ -228,7 +228,7 @@ wx: |
| 228 | 228 | config-storage: |
| 229 | 229 | type: RedisTemplate # 采用 RedisTemplate 操作 Redis,会自动从 Spring 中获取 |
| 230 | 230 | key-prefix: wa # Redis Key 的前缀 |
| 231 | - http-client-type: HttpClient # 采用 HttpClient 请求微信公众号平台 | |
| 231 | + http-client-type: HttpComponents # 采用 HttpComponents(HttpClient 5)请求微信公众号平台 | |
| 232 | 232 | |
| 233 | 233 | --- #################### 芋道相关配置 #################### |
| 234 | 234 | ... | ... |