1
私は春の統合に新しく、いくつかのイベントベースの処理を行う必要がありますか?誰でもApplicationEventPublisherの使い方を教えてください。サンプルはとても役に立ちます。AnnotationとSpring統合でApplicationEventPublisherを使用する方法は?
私は春の統合に新しく、いくつかのイベントベースの処理を行う必要がありますか?誰でもApplicationEventPublisherの使い方を教えてください。サンプルはとても役に立ちます。AnnotationとSpring統合でApplicationEventPublisherを使用する方法は?
Springアプリケーションイベントを公開する場合、Spring IntegrationはApplicationEventPublishingMessageHandler
コンポーネントを提供します。
@ServiceActivator(inputChannel = "sendEventChannel")
@Bean
public MessageHandler eventProducer() {
return new ApplicationEventPublishingMessageHandler();
}
もhttp://docs.spring.io/spring-integration/reference/html/applicationevent.htmlを参照してください。これは単に生産を送信し、@ServiceActivator
注釈と一緒に設定する必要があり、一方通行です。