ITADN

Seata 2.2.0 TCC模式 SQL Server 无法获取branchId

#8045ClosedUokyI 创建于 2026-04-03
U
UokyIcommented
### Check Ahead - [x] I have searched the [issues](https://github.com/seata/seata/issues) of this repository and believe that this is not a duplicate. - [ ] I am willing to try to fix this bug myself. ### Ⅰ. Issue Description 使用TCC相关注解,查看日志,是以AT模式注册 相关注解已加,但无法被识别为AT模式 ``` java.lang.NoSuchMethodException: org.springframework.aop.SpringProxy.xxxTCC( org.apache.seata.rm.tcc.api.BusinessActionContext, org.apache.seata.bean.XXXXDTO) at java.lang.Class.getMethod(Class.java:1786) at org.apache.seata.rm.tcc.interceptor.TccActionInterceptorHandler.lambda$parseAnnotation$0(TccActionInterceptorHandler.java:126) ``` ``` @LocalTCC @Service public class AccountTableTCCServiceImpl extends ServiceImpl<AccountTableMapper, AccountTable> implements IAccountTableTCCService { @TwoPhaseBusinessAction( name = "xxxtTCC", commitMethod = "xxxtTCCConfirm", rollbackMethod = "xxxtTCCCancel" ) @Override public boolean xxxtTCC(BusinessActionContext bac, TestDTO dto) { ... } @Override public boolean xxxtTCCConfirm(BusinessActionContext bac) { ... } @Override public boolean xxxtTCCCancel(BusinessActionContext bac) { ... } } ``` ### Ⅱ. Describe what happened 由1.6.1升级到 2.2.0 相关包路径已修改,且同步有加feign的全局配置,传递Headers ### Ⅲ. Describe what you expected to happen 需要正常获取分支ID ### Ⅳ. How to reproduce it (as minimally and precisely as possible) _No response_ ### Ⅴ. Anything else we need to know? _No response_ ### Ⅵ. Environment Seata 版本:2.2.0 数据库:SQL Server Microsoft SQL Server 2019 (RTM) - 15.0.2000.5 (X64) Standard Edition (64-bit) on Windows Server 2022 Standard 10.0 JDBC 驱动:mssql-jdbc-9.4.1.jre8.jar 连接池:Druid 1.1.22 ORM 框架:MyBatis-Plus 3.5.7 JDK:1.8.0_181
关闭于 2026-04-08 1 条评论