Files
spring-integration-samples/basic/helloworld
Artem Bilan 5f524dc534 Upgrade to SI-5.0 & SIK-3.0, Reactor 3.0
* Fix compatibility after Java DSL migration to the SI Core
* Also upgrade all the JMS sample to the JMS 2.0
* Fix default `connectionFactory` bean reference to the current `jmsConnectionFactory`
* Remove unsupported JPA-1.0 Spec via `OpenJpaAutoConfiguration`, since the minimum now is JPA-2.0
* Remove non-lambda sample since minimum now is Java 8
* Rename `PromiseTest` to `MonoTest` and fix it to Reactor 3.0
* Fix `stomp-server.xml` to use proper Reactor 3.0 `eactor.util.function.Tuples` for SpEL
* Regenerate POMs
2016-11-18 14:11:32 -05:00
..
2014-04-16 20:45:34 +03:00
2015-03-30 13:01:25 +03:00

Hello World Sample

This is an obvious place to get started. This sample project contains 2 basic sample applications:

  • Hello World
  • Poller Application

Hello World

The Hello World application demonstrates a simple message flow represented by the diagram below:

Message -> Channel -> ServiceActivator -> QueueChannel 

To run the sample simply execute HelloWorldApp in package org.springframework.integration.samples.helloworld. You can also execute that class using the Gradle:

$ gradlew :helloworld:runHelloWorldApp

You should see the following output:

INFO : org.springframework.integration.samples.helloworld.HelloWorldApp - ==> HelloWorldDemo: Hello World

Poller Application

This simple application will print out the current system time twice every 20 seconds.

More specifically, an Inbound Channel Adapter polls for the current system time 2 times every 20 seconds (20000 milliseconds). The resulting message contains as payload the time in milliseconds and the message is sent to a Logging Channel Adapter, which will print the time to the command prompt.

To run the sample simply execute PollerApp in package org.springframework.integration.samples.helloworld. You can also execute that class using the Gradle:

$ gradlew :helloworld:runPollerApp

You should see output like the following:

INFO : org.springframework.integration.samples.helloworld - 1328892135471
INFO : org.springframework.integration.samples.helloworld - 1328892135524