我目前正在將Springs XML-翻譯成Java-Configuration。 (春季版本4.3.4)我目前正在與Spring Integration拼搏。該JmsOutboundGateway好像不支持由它的XML對口支持的所有選項:JmsOutboundGateway - Java配置缺少選項?
XML:
<int-jms:outbound-gateway
correlation-key="JMSCorrelationID" auto-startup="true"
connection-factory="connectionFactory" explicit-qos-enabled="true"
time-to-live="60000" request-channel="myRequestChannel" request-destination="outQueue"
requires-reply="true" reply-channel="myResponseChannel" reply-destination="inQueue"
receive-timeout="20000" >
</int-jms:outbound-gateway>
翻譯的Java:
@Bean
public JmsOutboundGateway myGateway(){
JmsOutboundGateway gateway = new JmsOutboundGateway();
gateway.setConnectionFactory(connectionFactory());
gateway.setCorrelationKey("JMSCorrelationID");
gateway.setReplyChannel(myResponseChannel());
gateway.setReplyDestination(inQueue());
gateway.setReceiveTimeout(20000);
gateway.setExplicitQosEnabled(true);
gateway.setRequiresReply(true);
gateway.setRequestDestination(outQueue())
return gateway;
}
即自動啓動和請求通道似乎是「失蹤」。我只是在錯誤的地方找他們或者需要額外的步驟?我甚至誤解了一些東西?
在此先感謝!
感謝您的解釋和指導。 – NagelAufnKopp