Filter reactive tx managers in TransactionAttributeSourceClassFilter
Prior to this commit, the TransactionAttributeSourceClassFilter filtered out PlatformTransactionManager but not ReactiveTransactionManager implementations. TransactionAttributeSourceClassFilter now filters out any TransactionManager implementation, covering both imperative and reactive transaction managers.
This commit is contained in:
parent
ec3d647d1d
commit
f5d011cb82
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
@ -23,11 +23,11 @@ import org.springframework.aop.ClassFilter;
|
|||
import org.springframework.aop.support.StaticMethodMatcherPointcut;
|
||||
import org.springframework.dao.support.PersistenceExceptionTranslator;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.transaction.PlatformTransactionManager;
|
||||
import org.springframework.transaction.TransactionManager;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
/**
|
||||
* Inner class that implements a Pointcut that matches if the underlying
|
||||
* Abstract class that implements a Pointcut that matches if the underlying
|
||||
* {@link TransactionAttributeSource} has an attribute for a given method.
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
|
|
@ -87,7 +87,7 @@ abstract class TransactionAttributeSourcePointcut extends StaticMethodMatcherPoi
|
|||
@Override
|
||||
public boolean matches(Class<?> clazz) {
|
||||
if (TransactionalProxy.class.isAssignableFrom(clazz) ||
|
||||
PlatformTransactionManager.class.isAssignableFrom(clazz) ||
|
||||
TransactionManager.class.isAssignableFrom(clazz) ||
|
||||
PersistenceExceptionTranslator.class.isAssignableFrom(clazz)) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue