|
|
@ -68,15 +68,15 @@ class ServiceConnectionAutoConfigurationRegistrar implements ImportBeanDefinitio
|
|
|
|
|
|
|
|
|
|
|
|
private Set<ServiceConnection> getAnnotations(ConfigurableListableBeanFactory beanFactory, String beanName,
|
|
|
|
private Set<ServiceConnection> getAnnotations(ConfigurableListableBeanFactory beanFactory, String beanName,
|
|
|
|
BeanDefinition beanDefinition) {
|
|
|
|
BeanDefinition beanDefinition) {
|
|
|
|
Set<ServiceConnection> annoations = new LinkedHashSet<>();
|
|
|
|
Set<ServiceConnection> annotations = new LinkedHashSet<>();
|
|
|
|
annoations.addAll(beanFactory.findAllAnnotationsOnBean(beanName, ServiceConnection.class, false));
|
|
|
|
annotations.addAll(beanFactory.findAllAnnotationsOnBean(beanName, ServiceConnection.class, false));
|
|
|
|
if (beanDefinition instanceof TestcontainerBeanDefinition testcontainerBeanDefinition) {
|
|
|
|
if (beanDefinition instanceof TestcontainerBeanDefinition testcontainerBeanDefinition) {
|
|
|
|
testcontainerBeanDefinition.getAnnotations()
|
|
|
|
testcontainerBeanDefinition.getAnnotations()
|
|
|
|
.stream(ServiceConnection.class)
|
|
|
|
.stream(ServiceConnection.class)
|
|
|
|
.map(MergedAnnotation::synthesize)
|
|
|
|
.map(MergedAnnotation::synthesize)
|
|
|
|
.forEach(annoations::add);
|
|
|
|
.forEach(annotations::add);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return annoations;
|
|
|
|
return annotations;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private BeanDefinition getBeanDefinition(ConfigurableListableBeanFactory beanFactory, String beanName) {
|
|
|
|
private BeanDefinition getBeanDefinition(ConfigurableListableBeanFactory beanFactory, String beanName) {
|
|
|
|