Add containsBean(:String) method to the SpringApplicationContextIntegrationTestsSupport class.

This commit is contained in:
John Blum
2021-09-14 23:32:33 -07:00
parent 876ad6ec52
commit f24c1a7690

View File

@@ -85,6 +85,13 @@ public abstract class SpringApplicationContextIntegrationTestsSupport extends In
}
}
protected boolean containsBean(String beanName) {
ConfigurableApplicationContext applicationContext = requireApplicationContext();
return applicationContext.containsBean(beanName);
}
protected <T> T getBean(Class<T> requiredType) {
ConfigurableApplicationContext applicationContext = requireApplicationContext();