-
-
Notifications
You must be signed in to change notification settings - Fork 911
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SpringCloudSecondaryConfiguration.annotationDrivenTransactionManager()Lorg/springframework/transaction/TransactionManager; is abstract #126
Comments
你这个错误日志太少了,看不出是具体问题。不过,这类错误一般都是jar包的版本不兼容导致。 |
这个问题已经解决,是因为版本的问题导致 |
1. 问题描述现在又有一个新的问题,大概意思就是服务消费者执行后能正常 confirm,但是服务提供者并没有执行 confirm,那我现在的场景来说,订单支付成功了,但是账户服务冻结的资金也没有减掉。 2. 详细情况2.1. 服务消费者@Service
@Compensable(interfaceClass = PaymentService.class, simplified = true)
public class PaymentServiceImpl implements PaymentService {
private OrderService orderService;
private AccountClient accountClient;
@Transactional
@Override
public void payment(Order order) {
orderService.updateOrderStatus(order, OrderStatus.PAYING);
accountClient.decrease(buildAccountPaymentDTO(order));
}
@CompensableConfirm
@Transactional
public void confirm(Order order) {
log.info("================= PaymentService 执行 confirm 接口 =================");
orderService.updateOrderStatus(order, OrderStatus.PAY_SUCCESS);
}
@CompensableCancel
@Transactional
public void cancel(Order order) {
log.info("================= PaymentService 执行 cancel 接口 =================");
orderService.updateOrderStatus(order, OrderStatus.PAY_FAIL);
} 2.2. 服务提供者@Service
@Compensable(interfaceClass = AccountService.class, simplified = true)
public class AccountServiceImpl implements AccountService {
@Transactional
@Override
public void decrease(AccountPaymentDTO accountPaymentDTO) {
accountMapper.decrease(accountPaymentDTO.getUserId(), accountPaymentDTO.getAmount());
}
@CompensableConfirm
@Transactional
public void confirm(AccountPaymentDTO accountPaymentDTO) {
log.info("================= accountService 执行 confirm 接口 =================");
accountMapper.confirmDecrease(accountPaymentDTO.getUserId(), accountPaymentDTO.getAmount());
}
@CompensableCancel
@Transactional
public void cancel(AccountPaymentDTO accountPaymentDTO) {
log.info("================= accountService 执行 cancel 接口 =================");
accountMapper.cancelDecrease(accountPaymentDTO.getUserId(), accountPaymentDTO.getAmount());
}
} 3. 日志信息3.1. 服务消费者日志
3.2. 服务提供者日志
|
这种情况一种可能是服务端confirm执行出错; |
版本
spring.boot.version:2.3.2.RELEASE
spring.cloud.version:Hoxton.SR8
bytetcc-supports-springcloud.version:0.5.9
在使用 Spring Cloud 整合 ByteTCC 启动时的报错信息
2020-10-15 09:51:05.898 WARN 83254 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'feignPostProcessor' defined in org.bytesoft.bytetcc.supports.springcloud.config.SpringCloudSecondaryConfiguration: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration': Injection of autowired dependencies failed; nested exception is java.lang.AbstractMethodError: Method org/bytesoft/bytetcc/supports/springcloud/config/SpringCloudSecondaryConfiguration.annotationDrivenTransactionManager()Lorg/springframework/transaction/TransactionManager; is abstract
启动类
The text was updated successfully, but these errors were encountered: