-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#6 Got completely rid of fast-classpath-scanner and went for the Spri…
…ng variant (https://github.com/spring-projects/spring-framework/blob/master/spring-context/src/main/java/org/springframework/context/annotation/ClassPathScanningCandidateComponentProvider.java). New tests for the WebServiceScanner. This was only possible, because Spring is after all able to scan for Interfaces which have specific Annotations (http://stackoverflow.com/a/41504372/4964553). Therefore Spring can be used and all problems with java -jar and mvn spring-boot:run not finding classes or CXF gone wild are completely gone now!
- Loading branch information
1 parent
dbc71e7
commit 08bcb2c
Showing
8 changed files
with
118 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...tric/cxf/autodetection/InterfaceIncludingClassPathScanningCandidateComponentProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters