From f382c4f10b10d2c03f3e6daa824d20e0176d37af Mon Sep 17 00:00:00 2001 From: shukai Date: Tue, 21 Jan 2025 09:24:28 +0800 Subject: [PATCH 1/2] bugfix:GlobalTransactionScanner.afterPropertiesSet need do scanner check --- .../seata/spring/annotation/GlobalTransactionScanner.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/spring/src/main/java/org/apache/seata/spring/annotation/GlobalTransactionScanner.java b/spring/src/main/java/org/apache/seata/spring/annotation/GlobalTransactionScanner.java index 2170e59958f..c4713627831 100644 --- a/spring/src/main/java/org/apache/seata/spring/annotation/GlobalTransactionScanner.java +++ b/spring/src/main/java/org/apache/seata/spring/annotation/GlobalTransactionScanner.java @@ -341,6 +341,10 @@ private boolean doCheckers(Object bean, String beanName) { return false; } + return doScannerCheckers(bean, beanName); + } + + private boolean doScannerCheckers(Object bean, String beanName) { if (!SCANNER_CHECKER_SET.isEmpty()) { for (ScannerChecker checker : SCANNER_CHECKER_SET) { try { @@ -354,7 +358,6 @@ private boolean doCheckers(Object bean, String beanName) { } } } - return true; } @@ -512,6 +515,9 @@ private void findBusinessBeanNamesNeededEnhancement() { if (IGNORE_ENHANCE_CHECK_SET.contains(beanDefinition.getBeanClassName())) { continue; } + if (!doScannerCheckers(null, beanDefinition.getBeanClassName())) { + continue; + } try { // get the class by bean definition class name Class beanClass = Class.forName(beanDefinition.getBeanClassName()); From 9510db0d6163adf092ea460c68a59923c9ce2810 Mon Sep 17 00:00:00 2001 From: shukai Date: Tue, 21 Jan 2025 14:11:31 +0800 Subject: [PATCH 2/2] add change --- changes/en-us/2.x.md | 1 + changes/zh-cn/2.x.md | 1 + 2 files changed, 2 insertions(+) diff --git a/changes/en-us/2.x.md b/changes/en-us/2.x.md index 419f3f63371..33fbae6184d 100644 --- a/changes/en-us/2.x.md +++ b/changes/en-us/2.x.md @@ -14,6 +14,7 @@ Add changes here for all PR submitted to the 2.x branch. - [[#7104](https://github.com/apache/incubator-seata/pull/7104)] fix impl of supportsSourceType is not defined - [[#7116](https://github.com/apache/incubator-seata/pull/7116)] fix prefix: seata.server.raft.ssl should not be null - [[#7112](https://github.com/apache/incubator-seata/pull/7112)] bugfix: remove the condition that IPv6 must start with fe80 +- [[#7124](https://github.com/apache/incubator-seata/pull/7124)] bugfix: GlobalTransactionScanner.afterPropertiesSet need do scanner check ### optimize: diff --git a/changes/zh-cn/2.x.md b/changes/zh-cn/2.x.md index 2f7d72c5ef5..bd67069da53 100644 --- a/changes/zh-cn/2.x.md +++ b/changes/zh-cn/2.x.md @@ -14,6 +14,7 @@ - [[#7104](https://github.com/apache/incubator-seata/pull/7104)] 修复SeataApplicationListener在低版本springboot未实现supportsSourceType方法的问题 - [[#7116](https://github.com/apache/incubator-seata/pull/7116)] 修复 seata.server.raft.ssl 前缀不存在的问题 - [[#7112](https://github.com/apache/incubator-seata/pull/7112)] 校验是否IPv6网络ip取消必须以fe80开始的条件 +- [[#7124](https://github.com/apache/incubator-seata/pull/7124)] GlobalTransactionScanner.afterPropertiesSet方法需要做扫描检查 ### optimize: