0
我有下面的XML一個Spring Servlet的應用程序上下文:當Spring上下文被銷燬時,Spring Servlet應用上下文是否會停止Camel ProducerTemplate?
...
<camelContext xmlns="http://camel.apache.org/schema/spring" id="camelContext">
<contextScan />
<template id="aProducerTemplate" />
</camelContext>
...
和使用像這樣:
@Service
public class MyService {
@Autowired
private ProducerTemplate aProducerTemplate;
...
由於製作模板是在春天的Servlet應用程序上下文管理bean將它當Spring應用程序上下文初始化時調用aProducerTemplate.start()
,並在應用程序上下文被銷燬時調用aProducerTemplate.stop()
?