Skip to content
This repository was archived by the owner on Jul 9, 2022. It is now read-only.
olegz edited this page Jun 15, 2011 · 114 revisions

Welcome to Spring Integration Scala DSL wiki!

Sample Usage

Simple Message exchange between Point-to-Point channel (DirectChannel) and Service Activator

var integrationContext = SpringIntegrationContext()

val inputChannel = channel("inputChannel")

integrationContext <= {
  inputChannel >>
  activate("myService"){m:Message[String] => {println(m.getPayload)}}
}
   
integrationContext.init

inputChannel.send(new GenericMessage("==> Hello from Scala"))

In the above example ServiceActivator is provided with Scala function which simply prints the payload of the Message. You can also use Spring's Expression Language (SpEL). The equivalent Service Activator configuration would look like this:

activate(){"T(java.lang.System).out.println(payload)"}
Clone this wiki locally