1

The Spring Integration Java DSL Reference and Spring Batch Java Configuration documentation show how to use Java Configuration for Spring Integration and Spring Batch.

But they dont show how to configure it for the Spring Batch Integration. How is a JobLaunchingGateway configured using DSL?

Cheers, Menno

Menno
  • 97
  • 1
  • 7
  • I created a very simple example here: https://github.com/pakmans/spring-batch-integration-example (I know the question is old, but I post here for anyone struggling with this... like me). – pakman Jun 30 '17 at 16:19

2 Answers2

1

The JobLaunchingGateway is a MessageHandler so you would define it as a @Bean and use it in a .handle() method in the flow.

Gary Russell
  • 166,535
  • 14
  • 146
  • 179
  • Thanks, that worked. I've only used integration gateways for generating proxies for my interfaces, so didn't realise I could just use it as a message handler. – Menno Sep 02 '14 at 17:47
0

Gary is correct. You can see a demo of the java config version of this in my webinar on Spring Batch 3.0:

Video: https://www.youtube.com/watch?v=lHCPppMlylY
Code: https://github.com/mminella/SpringBatchWebinar

The SpringBatchIntegration module of that project is what will interest you.

Michael Minella
  • 20,843
  • 4
  • 55
  • 67