-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Make use of Batch 4.0 M4's new API for accessing job parameters #10135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm not 100% sure I've understood which logic it is that you'd like to be able to reuse. Is it what's done in |
I think @wilkinsona is correct - the OP wants to split out the logic in |
Thanks, @dsyer. @mminella what do you think? Is this method something that you could add to Batch, or do you think it's better-suited to living in Boot or the user's own code? |
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed. |
I'm fine with pulling this into batch. And 4.0 would be a good opportunity to do so. I've created this Jira item to track us moving it over: https://jira.spring.io/browse/BATCH-2640 |
Neat. Thanks, @mminella. Let's use this issue to move onto the Batch-provided version of what's currently in Boot. |
The private method |
@diegolovison To reduce the chance of it being missed, I'd recommend making that suggestion on BATCH-2640. It's tracking the Spring Batch changes. |
Just an update, I just merged BATCH-2640. FYI, the merge capability is already available on the |
We are building an application that have dozens jobs.
Each job is configured to run in a scheduled way.
In this case, "myJob" will run once because we need to properly configure the JobParameters.
There is an excelent example how to propertly configure the parameters in the class JobLauncherCommandLineRunner.
What I am suggesting here is split the logic in the class JobLauncherCommandLineRunner.
Creating another class like "FooJobLauncher" that will have the business logic to execute the job getting the next parameter.
The class JobLauncherCommandLineRunner will use the "FooJobLauncher".
In this way I can autowired "FooJobLauncher" in my class without worrying with the next parameters logic.
I can create a merge request if the team agree with the change. I only need to know a better name for "FooJobLauncher".
Thanks
The text was updated successfully, but these errors were encountered: