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.
@@ -66,6 +66,16 @@ public class CompositeCacheOperationSource implements CacheOperationSource, Seri
return false;
}
@Override
public boolean hasCacheOperations(Method method, @Nullable Class<?> targetClass) {
for (CacheOperationSource source : this.cacheOperationSources) {
if (source.hasCacheOperations(method, targetClass)) {
return true;
}
}
return false;
}
@Override
@Nullable
public Collection<CacheOperation> getCacheOperations(Method method, @Nullable Class<?> targetClass) {