Description
Per the Spring Boot documentation for passing command line args, the convention is to use two dashes before the name of a property: --foo=bar
.
When those values are passed to Spring Batch, only the first dash is removed. This leaves the value being passed to the job as a job parameter as -foo=bar
. The issue here is that the dash at the front of foo
actually has a material impact on it's meaning within Spring Batch. The preceding dash indicates that the job parameter should not be considered identifying (meaning it doesn't contribute to the determination if this is the same JobInstance
or not).
The only way to get this to work correctly is to leave off the dashes completely which is counter intuitive if you're reading the Spring Boot documentation. Can we get a blurb added in the batch section to indicate that the way to pass identifying job parameters to a job is without the dashes? I can provide a sample app that demonstrates the issue if that is useful.