Skip to content

Commit b6886bc

Browse files
committed
Merge pull request #15081 from nishantraut
* pr/15081: Polish contribution Update documentation to remind how JobParameters should be specified
2 parents f5ba995 + 69d9b7a commit b6886bc

File tree

1 file changed

+10
-0
lines changed
  • spring-boot-project/spring-boot-docs/src/main/asciidoc

1 file changed

+10
-0
lines changed

spring-boot-project/spring-boot-docs/src/main/asciidoc/howto.adoc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2378,6 +2378,16 @@ By default, it executes *all* `Jobs` in the application context on startup (see
23782378
for details). You can narrow down to a specific job or jobs by specifying
23792379
`spring.batch.job.names` (which takes a comma-separated list of job name patterns).
23802380

2381+
[TIP]
2382+
.Specifying job parameters on the command line
2383+
====
2384+
Unlike command line option arguments that
2385+
<<spring-boot-features.adoc#boot-features-external-config-command-line-args,set properties
2386+
in the `Environment`>> (i.e. by starting with `--`, such as
2387+
`--my-property=value`), job parameters have to be specified on the command line without
2388+
dashes (e.g. `jobParam=value`).
2389+
====
2390+
23812391
If the application context includes a `JobRegistry`, the jobs in
23822392
`spring.batch.job.names` are looked up in the registry instead of being autowired from the
23832393
context. This is a common pattern with more complex systems, where multiple jobs are

0 commit comments

Comments
 (0)