Skip to content

Commit

Permalink
using better naming
Browse files Browse the repository at this point in the history
Signed-off-by: Santhosh Gandhe <[email protected]>
  • Loading branch information
san81 committed Oct 2, 2024
1 parent 6d41ed2 commit 65e9b2f
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,16 @@ public BeanFactory get() {
}

public BeanFactory initializePluginSpecificIsolatedContext(Class[] markersToScanForDI) {
AnnotationConfigApplicationContext pluginDIContext = new AnnotationConfigApplicationContext();
AnnotationConfigApplicationContext isolatedPluginApplicationContext = new AnnotationConfigApplicationContext();
if(markersToScanForDI!=null && markersToScanForDI.length>0) {
// If packages to scan is provided in this plugin annotation, which indicates
// that this plugin is interested in using Dependency Injection isolated for its module
Arrays.stream(markersToScanForDI)
.map(Class::getPackageName)
.forEach(pluginDIContext::scan);
pluginDIContext.refresh();
.forEach(isolatedPluginApplicationContext::scan);
isolatedPluginApplicationContext.refresh();
}
pluginDIContext.setParent(sharedPluginApplicationContext);
return pluginDIContext.getBeanFactory();
isolatedPluginApplicationContext.setParent(sharedPluginApplicationContext);
return isolatedPluginApplicationContext.getBeanFactory();
}
}

0 comments on commit 65e9b2f

Please sign in to comment.