JDK11: @ComponentScan doesn't work properly in JUnit tests #18516
Labels
for: external-project
For an external project and not something we can fix
status: duplicate
A duplicate of another issue
@ComponentScan
cannot detect components in sub-packages if module-info.java(JDK11) presents in the sources.Steps to reproduce:
mvn clean test
Actual result:
Expected result:
Workarounds:
@Import
instead of@ComponentScan
, see com.example.demo.ServiceModuleConfiguration in the attached sampleThe text was updated successfully, but these errors were encountered: