GH-1870 Fixed destroy beans logic
- Fixed destroy bean logic in AbstractMessageChannelBinder to ensure that it only destroys beans that are 'reachable' (have bean definitions) Resolves #1870
This commit is contained in:
@@ -824,7 +824,7 @@ public abstract class AbstractMessageChannelBinder<C extends ConsumerProperties,
|
||||
}
|
||||
|
||||
private void destroyBean(String beanName) {
|
||||
if (getApplicationContext().containsBean(beanName)) {
|
||||
if (getApplicationContext().containsBeanDefinition(beanName)) {
|
||||
((DefaultSingletonBeanRegistry) getApplicationContext().getBeanFactory())
|
||||
.destroySingleton(beanName);
|
||||
((GenericApplicationContext) getApplicationContext())
|
||||
|
||||
Reference in New Issue
Block a user