Saturday, August 25, 2018

Simple spring integration with springboot

In this example we will see a simple file poller application using spring integration. It will poll for a file in a particular location at certain interval and if file is found it will move it to another location.

There are 3 core components of spring integration -

Messages - Messages are the objects sent from one component to another. In our case a file is sent from file poller to file handler.
Channels - Assume channels are the network (a pipe) by which messages are sent from one component to another.
Adapters - Adapters route the output from one channel to the input of another one.



Please see the codes below -



pom.xml


Application.java


ApplicationConfig.java


FilePoller.java


FileHandler.java

No comments:

Post a Comment