File tree 1 file changed +5
-4
lines changed
src/main/java/org/springframework/data/repository/config
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -159,12 +159,13 @@ public List<BeanComponentDefinition> registerRepositoriesIn(BeanDefinitionRegist
159
159
*/
160
160
private boolean multipleStoresDetected () {
161
161
162
- ClassPathScanningCandidateComponentProvider scanner = new ClassPathScanningCandidateComponentProvider (false ,
163
- environment );
162
+ ClassPathScanningCandidateComponentProvider scanner = new ClassPathScanningCandidateComponentProvider (false );
163
+ scanner .setEnvironment (environment );
164
+ scanner .setResourceLoader (resourceLoader );
164
165
scanner .addIncludeFilter (new LenientAssignableTypeFilter (RepositoryFactorySupport .class ));
165
- int numberOfModulesFound = scanner .findCandidateComponents (MODULE_DETECTION_PACKAGE ).size ();
166
166
167
- if (numberOfModulesFound > 1 ) {
167
+ if (scanner .findCandidateComponents (MODULE_DETECTION_PACKAGE ).size () > 1 ) {
168
+
168
169
LOGGER .debug (MULTIPLE_MODULES );
169
170
return true ;
170
171
}
You can’t perform that action at this time.
0 commit comments