From the course: Spring: Spring Integration

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Solution: Configure a service activator

Solution: Configure a service activator - Spring Tutorial

From the course: Spring: Spring Integration

Start my 1-month free trial

Solution: Configure a service activator

(gentle music) - [Instructor] Let us complete our code challenge together. The challenges you recall is to add a service activator to the message flow, so that our status monitoring channel will automatically cause a customer account credit to be applied. This way the account credit functionality can be achieved as a by-product of the existing message flow without a manual invocation of the service inside our business logic. In order to achieve this, what we need to do is add service activation configuration to our status monitor message flow. And that will look like this. Leveraging the integration namespace, we want a service activator element. Our input channel shall be our status monitor channel. When something comes through this channel, we're trying to activate. The bean that we activate here that we're referencing is identified in line 33 as account credit service. And the method that we want to call inside that…

Contents