Commit 11b5cb5288b6c9edaa1c364329460dd53cd35a91
1 parent
f639a76b
fix: 升级 Fastjson2 并排除 Fastjson1
Showing
6 changed files
with
46 additions
and
14 deletions
yudao-dependencies/pom.xml
| ... | ... | @@ -58,8 +58,7 @@ |
| 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 | - <fastjson.version>1.2.83</fastjson.version> | |
| 62 | - <fastjson2.version>2.0.62</fastjson2.version> | |
| 61 | + <fastjson2.version>2.0.63</fastjson2.version> | |
| 63 | 62 | <guava.version>33.6.0-jre</guava.version> |
| 64 | 63 | <transmittable-thread-local.version>2.14.5</transmittable-thread-local.version> |
| 65 | 64 | <commons-net.version>3.13.0</commons-net.version> |
| ... | ... | @@ -243,6 +242,12 @@ |
| 243 | 242 | <groupId>org.dromara</groupId> |
| 244 | 243 | <artifactId>easy-trans-anno</artifactId> |
| 245 | 244 | <version>${easy-trans.version}</version> |
| 245 | + <exclusions> | |
| 246 | + <exclusion> | |
| 247 | + <groupId>com.alibaba</groupId> | |
| 248 | + <artifactId>fastjson</artifactId> | |
| 249 | + </exclusion> | |
| 250 | + </exclusions> | |
| 246 | 251 | </dependency> |
| 247 | 252 | |
| 248 | 253 | <dependency> |
| ... | ... | @@ -314,6 +319,12 @@ |
| 314 | 319 | <groupId>org.apache.rocketmq</groupId> |
| 315 | 320 | <artifactId>rocketmq-spring-boot-starter</artifactId> |
| 316 | 321 | <version>${rocketmq-spring.version}</version> |
| 322 | + <exclusions> | |
| 323 | + <exclusion> | |
| 324 | + <groupId>com.alibaba</groupId> | |
| 325 | + <artifactId>fastjson</artifactId> | |
| 326 | + </exclusion> | |
| 327 | + </exclusions> | |
| 317 | 328 | </dependency> |
| 318 | 329 | |
| 319 | 330 | <!-- 服务保障相关 --> |
| ... | ... | @@ -502,7 +513,7 @@ |
| 502 | 513 | <dependency> |
| 503 | 514 | <groupId>com.alibaba</groupId> |
| 504 | 515 | <artifactId>fastjson</artifactId> |
| 505 | - <version>${fastjson.version}</version> | |
| 516 | + <version>${fastjson2.version}</version> <!-- fastjson2 官方提供的 1.x API 兼容实现 --> | |
| 506 | 517 | </dependency> |
| 507 | 518 | <dependency> |
| 508 | 519 | <groupId>com.alibaba.fastjson2</groupId> |
| ... | ... | @@ -631,6 +642,12 @@ |
| 631 | 642 | <groupId>me.zhyd.oauth</groupId> |
| 632 | 643 | <artifactId>JustAuth</artifactId> <!-- 社交登陆(例如说,个人微信、企业微信等等) --> |
| 633 | 644 | <version>${justauth.version}</version> |
| 645 | + <exclusions> | |
| 646 | + <exclusion> | |
| 647 | + <groupId>com.alibaba</groupId> | |
| 648 | + <artifactId>fastjson</artifactId> | |
| 649 | + </exclusion> | |
| 650 | + </exclusions> | |
| 634 | 651 | </dependency> |
| 635 | 652 | <dependency> |
| 636 | 653 | <groupId>com.xkcoding.justauth</groupId> |
| ... | ... | @@ -654,6 +671,10 @@ |
| 654 | 671 | <groupId>org.bouncycastle</groupId> |
| 655 | 672 | <artifactId>bcprov-jdk15on</artifactId> |
| 656 | 673 | </exclusion> |
| 674 | + <exclusion> | |
| 675 | + <groupId>com.alibaba</groupId> | |
| 676 | + <artifactId>fastjson</artifactId> | |
| 677 | + </exclusion> | |
| 657 | 678 | </exclusions> |
| 658 | 679 | </dependency> |
| 659 | 680 | |
| ... | ... | @@ -696,6 +717,12 @@ |
| 696 | 717 | <groupId>org.jeecgframework.jimureport</groupId> |
| 697 | 718 | <artifactId>jimureport-spring-boot3-starter</artifactId> |
| 698 | 719 | <version>${jimureport.version}</version> |
| 720 | + <exclusions> | |
| 721 | + <exclusion> | |
| 722 | + <groupId>com.alibaba</groupId> | |
| 723 | + <artifactId>fastjson</artifactId> | |
| 724 | + </exclusion> | |
| 725 | + </exclusions> | |
| 699 | 726 | </dependency> |
| 700 | 727 | <dependency> |
| 701 | 728 | <groupId>org.jeecgframework.jimureport</groupId> |
| ... | ... | @@ -710,6 +737,10 @@ |
| 710 | 737 | <groupId>cn.hutool</groupId> |
| 711 | 738 | <artifactId>hutool-core</artifactId> |
| 712 | 739 | </exclusion> |
| 740 | + <exclusion> | |
| 741 | + <groupId>com.alibaba</groupId> | |
| 742 | + <artifactId>fastjson</artifactId> | |
| 743 | + </exclusion> | |
| 713 | 744 | </exclusions> |
| 714 | 745 | </dependency> |
| 715 | 746 | </dependencies> | ... | ... |
yudao-framework/yudao-common/pom.xml
| ... | ... | @@ -134,6 +134,11 @@ |
| 134 | 134 | </dependency> |
| 135 | 135 | |
| 136 | 136 | <dependency> |
| 137 | + <groupId>com.alibaba</groupId> | |
| 138 | + <artifactId>fastjson</artifactId> <!-- JustAuth、Jimu 等三方库仍使用 1.x 包名,由项目统一提供 fastjson2 兼容实现 --> | |
| 139 | + </dependency> | |
| 140 | + | |
| 141 | + <dependency> | |
| 137 | 142 | <groupId>org.dromara</groupId> <!-- VO 数据翻译 --> |
| 138 | 143 | <artifactId>easy-trans-anno</artifactId> <!-- 默认引入的原因,方便 xxx-module-api 包使用 --> |
| 139 | 144 | </dependency> | ... | ... |
yudao-module-ai/pom.xml
| ... | ... | @@ -242,6 +242,10 @@ |
| 242 | 242 | <groupId>org.slf4j</groupId> |
| 243 | 243 | <artifactId>slf4j-reload4j</artifactId> |
| 244 | 244 | </exclusion> |
| 245 | + <exclusion> | |
| 246 | + <groupId>com.alibaba</groupId> | |
| 247 | + <artifactId>fastjson</artifactId> | |
| 248 | + </exclusion> | |
| 245 | 249 | </exclusions> |
| 246 | 250 | </dependency> |
| 247 | 251 | </dependencies> | ... | ... |
yudao-module-ai/src/main/java/cn/iocoder/yudao/module/ai/service/workflow/AiWorkflowServiceImpl.java
| ... | ... | @@ -10,8 +10,8 @@ import cn.iocoder.yudao.module.ai.controller.admin.workflow.vo.AiWorkflowTestReq |
| 10 | 10 | import cn.iocoder.yudao.module.ai.dal.dataobject.workflow.AiWorkflowDO; |
| 11 | 11 | import cn.iocoder.yudao.module.ai.dal.mysql.workflow.AiWorkflowMapper; |
| 12 | 12 | import cn.iocoder.yudao.module.ai.service.model.AiModelService; |
| 13 | -import com.alibaba.fastjson.JSONArray; | |
| 14 | -import com.alibaba.fastjson.JSONObject; | |
| 13 | +import com.alibaba.fastjson2.JSONArray; | |
| 14 | +import com.alibaba.fastjson2.JSONObject; | |
| 15 | 15 | import dev.tinyflow.core.Tinyflow; |
| 16 | 16 | import jakarta.annotation.Resource; |
| 17 | 17 | import lombok.extern.slf4j.Slf4j; | ... | ... |
yudao-module-pay/src/test/java/cn/iocoder/yudao/module/pay/service/channel/PayChannelServiceTest.java
| ... | ... | @@ -12,7 +12,6 @@ import cn.iocoder.yudao.module.pay.framework.pay.core.client.PayClient; |
| 12 | 12 | import cn.iocoder.yudao.module.pay.framework.pay.core.client.PayClientFactory; |
| 13 | 13 | import cn.iocoder.yudao.module.pay.framework.pay.core.client.impl.alipay.AlipayPayClientConfig; |
| 14 | 14 | import cn.iocoder.yudao.module.pay.framework.pay.core.client.impl.weixin.WxPayClientConfig; |
| 15 | -import com.alibaba.fastjson.JSON; | |
| 16 | 15 | import jakarta.annotation.Resource; |
| 17 | 16 | import jakarta.validation.Validator; |
| 18 | 17 | import org.junit.jupiter.api.Test; |
| ... | ... | @@ -109,7 +108,7 @@ public class PayChannelServiceTest extends BaseDbUnitTest { |
| 109 | 108 | AlipayPayClientConfig payClientPublicKeyConfig = randomAlipayPayClientConfig(); |
| 110 | 109 | PayChannelUpdateReqVO reqVO = randomPojo(PayChannelUpdateReqVO.class, o -> { |
| 111 | 110 | o.setStatus(CommonStatusEnum.ENABLE.getStatus()); |
| 112 | - o.setConfig(JSON.toJSONString(payClientPublicKeyConfig)); | |
| 111 | + o.setConfig(JsonUtils.toJsonString(payClientPublicKeyConfig)); | |
| 113 | 112 | }); |
| 114 | 113 | |
| 115 | 114 | // 调用, 并断言异常 | ... | ... |
yudao-module-report/src/main/java/cn/iocoder/yudao/module/report/framework/jmreport/core/service/JmOnlDragExternalServiceImpl.java
| 1 | 1 | package cn.iocoder.yudao.module.report.framework.jmreport.core.service; |
| 2 | 2 | |
| 3 | -import com.alibaba.fastjson.JSONObject; | |
| 4 | 3 | import lombok.RequiredArgsConstructor; |
| 5 | 4 | import org.jeecg.modules.drag.service.IOnlDragExternalService; |
| 6 | 5 | import org.jeecg.modules.drag.vo.DragDictModel; |
| 7 | 6 | import org.jeecg.modules.drag.vo.DragLogDTO; |
| 8 | 7 | |
| 9 | 8 | import java.util.List; |
| 10 | -import java.util.Map; | |
| 11 | 9 | |
| 12 | 10 | /** |
| 13 | 11 | * {@link IOnlDragExternalService} 实现类,提供积木仪表盘的查询等功能 |
| ... | ... | @@ -24,11 +22,6 @@ public class JmOnlDragExternalServiceImpl implements IOnlDragExternalService { |
| 24 | 22 | // ========== DictItem 相关 ========== |
| 25 | 23 | |
| 26 | 24 | @Override |
| 27 | - public Map<String, List<DragDictModel>> getManyDictItems(List<String> codeList, List<JSONObject> tableDictList) { | |
| 28 | - return IOnlDragExternalService.super.getManyDictItems(codeList, tableDictList); | |
| 29 | - } | |
| 30 | - | |
| 31 | - @Override | |
| 32 | 25 | public List<DragDictModel> getDictItems(String dictCode) { |
| 33 | 26 | return IOnlDragExternalService.super.getDictItems(dictCode); |
| 34 | 27 | } | ... | ... |