Spring integration jvmdoen';Spring积分中的t出口

Spring integration jvmdoen';Spring积分中的t出口,spring-integration,Spring Integration,我是spring集成的新手,我使用以下代码 公共班机{ /** * @param args */ public static void main(String[] args) { ApplicationContext applicationContext = new ClassPathXmlApplicationContext( "trail03ApplicationContext.xml"); MessageChannel channel = app

我是spring集成的新手,我使用以下代码

公共班机{

/**
 * @param args
 */
public static void main(String[] args) {
    ApplicationContext applicationContext = new ClassPathXmlApplicationContext(
            "trail03ApplicationContext.xml");
    MessageChannel channel = applicationContext.getBean(
            "helloMessageChannel", MessageChannel.class);
    Message<String> message = MessageBuilder.withPayload("World").build();
    channel.send(message);


}
/**
*@param args
*/
公共静态void main(字符串[]args){
ApplicationContext ApplicationContext=新类路径XmlApplicationContext(
“trail03ApplicationContext.xml”);
MessageChannel=applicationContext.getBean(
“helloMessageChannel”,MessageChannel.class);
Message Message=MessageBuilder.withPayload(“World”).build();
信道发送(消息);
}
}

代码中没有任何问题,但jvm在发送消息后不会退出。它仍然在后台运行。从JVM可视查看器中可以明显看出这一点。有什么需要关闭的吗。我正在使用eclipse来测试应用程序


这是我的应用程序上下文

<?xml version="1.0" encoding="UTF-8"?>

<beans:beans xmlns="http://www.springframework.org/schema/integration"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
xsi:schemaLocation="http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">

<channel id="helloMessageChannel">

</channel>


<gateway service-interface="trail03.api.MessageService" id="myGateway" default-request-channel="helloMessageChannel"/>

<service-activator input-channel="helloMessageChannel"
    ref="helloMessageService" method="sayHello" />


<beans:bean id="helloMessageService" class="trail03.impl.MessageServiceImpl" />


发布日志文件和spring上下文。“jvm不退出”这句话没有多大意义这是我的应用程序上下文
helloMessageService
做什么?如果它抓住线程,JVM将不会退出。运行
jstack
进行线程转储,查看哪些线程阻碍了JVM退出。