List of usage examples for org.springframework.context.support ClassPathXmlApplicationContext getBeansOfType
@Override public <T> Map<String, T> getBeansOfType(@Nullable Class<T> type, boolean includeNonSingletons, boolean allowEagerInit) throws BeansException
From source file:org.entando.entando.aps.system.XmlWebApplicationContext.java
@Override public <T> Map<String, T> getBeansOfType(Class<T> type, boolean includeNonSingletons, boolean allowEagerInit) throws BeansException { Map<String, T> map = super.getBeansOfType(type, includeNonSingletons, allowEagerInit); List<ClassPathXmlApplicationContext> contexts = (List<ClassPathXmlApplicationContext>) this .getServletContext().getAttribute("pluginsContextsList"); if (contexts != null) { for (ClassPathXmlApplicationContext classPathXmlApplicationContext : contexts) { try { Map<String, T> tempmap = classPathXmlApplicationContext.getBeansOfType(type, includeNonSingletons, allowEagerInit); map.putAll(tempmap);/*from w w w. j av a2 s .c o m*/ } catch (Exception ex) { } } } return map; }