Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring Integration - Meeds-io/MIPs#57 #799

Merged
merged 14 commits into from
Jan 11, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: Include RootContainer Components in spring Contexts - Meeds-io/…
  • Loading branch information
boubaker committed Jan 11, 2024
commit 1cfc6dc78bd644750845563da1c9aa1e390259ea
Original file line number Diff line number Diff line change
@@ -21,6 +21,7 @@
import java.util.AbstractMap.SimpleEntry;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
@@ -30,6 +31,7 @@
import java.util.stream.Collectors;
import java.util.stream.Stream;

import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import org.picocontainer.Startable;
@@ -90,7 +92,11 @@ public void initContainer(ExoContainer container) throws Exception {
StringUtils.join(springContexts.keySet(), ","));
}
long start = System.currentTimeMillis();
Collection<ComponentAdapter<?>> kernelComponentAdapters = portalContainer.getComponentAdapters();
Collection<ComponentAdapter<?>> containerComponentAdapters = portalContainer.getComponentAdapters();
Collection<ComponentAdapter<?>> parentComponentAdapters = portalContainer.getParent()
!= null ? portalContainer.getParent().getComponentAdapters() : Collections.emptyList();
Collection<ComponentAdapter<?>> kernelComponentAdapters = CollectionUtils.union(containerComponentAdapters,
parentComponentAdapters);
Map<String, Map<String, BeanDefinition>> springBeansByContext = getBeansByServletContext();
LOG.info("1. Add Kernel Services in all Spring contexts");
addKernelToSpring(portalContainer, kernelComponentAdapters);