Search implemented interfaces for @ServiceConnection fields
Fixes gh-37671
This commit is contained in:
@@ -41,6 +41,7 @@ import org.springframework.util.ReflectionUtils;
|
||||
* @author Moritz Halbritter
|
||||
* @author Andy Wilkinson
|
||||
* @author Phillip Webb
|
||||
* @author Scott Frederick
|
||||
*/
|
||||
class ServiceConnectionContextCustomizerFactory implements ContextCustomizerFactory {
|
||||
|
||||
@@ -61,6 +62,9 @@ class ServiceConnectionContextCustomizerFactory implements ContextCustomizerFact
|
||||
if (TestContextAnnotationUtils.searchEnclosingClass(clazz)) {
|
||||
findSources(clazz.getEnclosingClass(), sources);
|
||||
}
|
||||
for (Class<?> implementedInterface : clazz.getInterfaces()) {
|
||||
findSources(implementedInterface, sources);
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
||||
Reference in New Issue
Block a user