All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.codecentric.cxf.autodetection.InterfaceIncludingClassPathScanningCandidateComponentProvider Maven / Gradle / Ivy

Go to download

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