Bana göre, bu sadece mümkün olan en basit yay entegrasyonu örneğidir. si4demo'dan öğrenmeye çalışıyorum. Bunu çalıştırdığınızda Ama bu durum almak: dizisindekiEntegrasyon akışı neden kanaldan abone olmaz?
İstisna "ana" org.springframework.messaging.MessageDeliveryException: Dispatcher kanalı 'application.inbox' için fazla abonesi .; Nerede yanlış gidiyorum Dispatcher hiçbir abonesi
sahiptir: iç içe özel org.springframework.integration.MessageDispatchingException nedir? Tanımlanan akış gelen kutusu kanalına bir abonelik oluşturmuyor mu?
import org.springframework.boot.SpringApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.integration.annotation.IntegrationComponentScan;
import org.springframework.integration.annotation.MessagingGateway;
import org.springframework.integration.channel.DirectChannel;
import org.springframework.integration.dsl.IntegrationFlow;
import org.springframework.integration.dsl.IntegrationFlows;
import org.springframework.messaging.MessageChannel;
@Configuration
@ComponentScan
@IntegrationComponentScan
public class App {
public static void main(String[] args) {
try (ConfigurableApplicationContext ctx = SpringApplication.run(App.class, args)) {
final Gateway gateway = ctx.getBean(Gateway.class);
final String rs = gateway.send("hullo");
System.out.println(rs);
}
}
private static final String INBOX = "inbox";
@MessagingGateway(defaultRequestChannel = INBOX)
public interface Gateway {
String send(String msg);
}
@Bean
public IntegrationFlow flow() {
return IntegrationFlows.from(INBOX)
.transform(p -> "world")
.get();
}
@Bean(name = INBOX)
public MessageChannel inbox() {
return new DirectChannel();
}
}
i özellikle TFM'ye bağlantı takdir! – djeikyb