use*_*545 4 java spring spring-integration
我有以下 ws 入站网关。如何使用 Spring Integration Java 8 DSL 进行此配置?
<int-ws:inbound-gateway id="ws-inbound-gateway"
request-channel="ws-request-channel"
reply-channel="ws-response-channel"
error-channel="ws-error-channel"/>
Run Code Online (Sandbox Code Playgroud)
不幸的是,我没有找到对这种入站网关的一级支持,但是您可以按如下方式修复此问题:
@Configuration
@EnableIntegration
public class IntegrationConfiguration {
@Bean
public SimpleWebServiceInboundGateway SimpleWebServiceInboundGateway() {
SimpleWebServiceInboundGateway simpleWebServiceInboundGateway = new SimpleWebServiceInboundGateway();
// your inbound configurtion
.....
return simpleWebServiceInboundGateway;
}
@Bean
public IntegrationFlow integrationFlow(){
return IntegrationFlows.from(SimpleWebServiceInboundGateway())
// your pipeline
.....
.get();
}
}
Run Code Online (Sandbox Code Playgroud)
在你的 Maven pom 中不要忘记这个依赖
<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-java-dsl</artifactId>
<version>1.1.2.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-ws</artifactId>
<version>4.2.5.RELEASE</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)
我希望这可以帮助你
| 归档时间: |
|
| 查看次数: |
1055 次 |
| 最近记录: |