-
Apr 20th, 2008, 10:05 AM
#1
How to pass parameters to the spring batch job?
I think I can pass the the parameters through JobParameters object.
But If I need to retrieve the parameters in the ItemReader or ItermWriter, what should I do?
who can help me, thank you!
-
Apr 20th, 2008, 05:11 PM
#2
You can get the JobParameters from the StepExecution, which can be accessed via a listener:
http://static.springframework.org/sp...n.html#d0e3618
-
Apr 21st, 2008, 08:36 AM
#3
Thank you for your help. And I think I can get the parameter from the StepExecution and pass them to the reader and writer using ExecutionContext, is that right?
-
Apr 21st, 2008, 09:23 AM
#4
Your readers and writers can also be StepExecutionListeners.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules