什么是 Spring Integration DSL 创建等价物的方式
<int:gateway service-interface="MyService" default-request-channel="myService.inputChannel"/>
// where my existing interface looks like
interface MyService { process(Foo foo); }
我无法找到工厂,org.springframework.integration.dsl
并且没有任何参数列表IntegrationFlows.from(...)
有助于自我发现。
感觉就像我缺少来自https://github.com/spring-projects/spring-integration-java-dsl/wiki/Spring-Integration-Java-DSL-Reference#using-protocolJava
的协议适配器之类的东西-适配器。
// I imagine this is what I can't find
IntegrationFlows.from(Java.gateway(MyService.class)
.channel("myService.inputChannel")
.get();
我遇到的唯一一件事是在一篇旧的博客文章中,但它似乎需要用@MessagingGateway
and注释界面@Gateway
,我想避免这种情况。见https://spring.io/blog/2014/11/25/spring-integration-java-dsl-line-by-line-tutorial