I'm working with spring boot 2.3 and I've some spring batch configurations inside it.
Currently if I want to run a spring batch process I've used the following approach
Spring batch job configuration
@Configuration("myJobConf")
@JobReference("myJob")
public class MyJob
application.yml
spring:
batch:
job:
enabled: true
names: ${JOB_NAME}
And when I want to launch the spring batch process from the command line I run
java -jar mySpringBootApplication.jar -DJOB_NAME=myJob
But now I need to pass some job parameters also. How can I do that?
Thank you