
de.codecentric.cxf.autodetection.InterfaceIncludingClassPathScanningCandidateComponentProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cxf-spring-boot-starter Show documentation
Show all versions of cxf-spring-boot-starter Show documentation
Boot starter for SOAP-Webservices with Apache CXF using JAX-WS & JAXB with Annotations only
The newest version!
package de.codecentric.cxf.autodetection;
import org.springframework.beans.factory.annotation.AnnotatedBeanDefinition;
import org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider;
/**
* Because org.springframework.core.type.classreading.ClassMetadataReadingVisitor.isConcrete() does exclude Interfaces from beeing returned,
* we have to override isCandidateComponent(AnnotatedBeanDefinition beanDefinition) to return true in every case.
* Now our Interface is also returned.
*/
class InterfaceIncludingClassPathScanningCandidateComponentProvider extends ClassPathScanningCandidateComponentProvider {
public InterfaceIncludingClassPathScanningCandidateComponentProvider() {
// false => Don't use default filters (@Component, etc.)
super(false);
}
@Override
protected boolean isCandidateComponent(AnnotatedBeanDefinition beanDefinition) {
return true;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy