Enable efficient pointcut checks for composite sources as well

Closes gh-20072
This commit is contained in:
Juergen Hoeller
2024-03-05 13:34:48 +01:00
parent 1fa6ac30b5
commit 30e75e4a09
2 changed files with 22 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2024 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.
@@ -63,6 +63,16 @@ public class CompositeTransactionAttributeSource implements TransactionAttribute
return false;
}
@Override
public boolean hasTransactionAttribute(Method method, @Nullable Class<?> targetClass) {
for (TransactionAttributeSource source : this.transactionAttributeSources) {
if (source.hasTransactionAttribute(method, targetClass)) {
return true;
}
}
return false;
}
@Override
@Nullable
public TransactionAttribute getTransactionAttribute(Method method, @Nullable Class<?> targetClass) {