Add getBeansOfType(Class<T>) method to the SpringApplicationContextIntegrationTestsSupport class.
This commit is contained in:
@@ -15,6 +15,8 @@
|
||||
*/
|
||||
package org.springframework.data.gemfire.tests.integration;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.junit.After;
|
||||
|
||||
import org.springframework.context.ApplicationContext;
|
||||
@@ -96,4 +98,11 @@ public abstract class SpringApplicationContextIntegrationTestsSupport extends In
|
||||
|
||||
return applicationContext.getBean(beanName, requiredType);
|
||||
}
|
||||
|
||||
protected <T> Map<String, T> getBeansOfType(Class<T> requiredType) {
|
||||
|
||||
ConfigurableApplicationContext applicationContext = requireApplicationContext();
|
||||
|
||||
return applicationContext.getBeansOfType(requiredType);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user