0

Lets say you run a spring batch program from maven:

mvn spring-boot:run -Dspring.batch.job.names=MyJobNameHere

What if I want to send job parameters? How would I accomplish that?

Nicholas DiPiazza
  • 10,029
  • 11
  • 83
  • 152

1 Answers1

1

From this answer, I found you can send parameters into a spring boot application using

-Drun.arguments="param1=value1 param2=value2"

Example:

mvn spring-boot:run -Dspring.batch.job.names=jobNameHere -Drun.arguments="arg=val arg2=val2" -f pom.xml

When running a Spring Batch, that same technique seems to work.

Nicholas DiPiazza
  • 10,029
  • 11
  • 83
  • 152