我从 spring 集成监控示例中了解到https://github.com/spring-projects/spring-integration-samples/tree/master/intermediate/monitoring https://github.com/spring-projects/spring-integration-samples/tree/master/intermediate/monitoring如何使用控制总线来关闭集成流程。我想知道怎么样
@integrationMBeanExporter.stopActiveComponents(false, 20000)
与仅关闭应用程序上下文不同
applicationContext.stop()
流被加载到其中。那岂不是达到同样的结果。
其实你是对的。从高处看,他们对组件做同样的事情:调用Lifecycle.stop()
.
您的应用程序在第一种情况下继续工作并且您可以调用的区别Lifecycle.start()
再次。和IntegrationMBeanExporter
仅适用于集成组件。
The applicationContext.stop()
fully shutdownSpring 应用程序上下文 - 在大多数情况下只是停止整个应用程序。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)