From 08ddb59f92cc9784a3b7011efb90399fab4e65e5 Mon Sep 17 00:00:00 2001 From: Nishant Raut Date: Sat, 3 Nov 2018 21:35:38 +0530 Subject: [PATCH 1/2] Update documentation to remind how JobParameters should be specified See gh-15081 --- .../spring-boot-docs/src/main/asciidoc/howto.adoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/howto.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/howto.adoc index 524aa3b017f..0902cebd368 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/howto.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/howto.adoc @@ -2378,6 +2378,8 @@ By default, it executes *all* `Jobs` in the application context on startup (see for details). You can narrow down to a specific job or jobs by specifying `spring.batch.job.names` (which takes a comma-separated list of job name patterns). +Unlike command line option arguments (which starts with `--`, e.g. `--spring=batch`) job parameters has to be passed without dashes to job (e.g. `spring=batch`). + If the application context includes a `JobRegistry`, the jobs in `spring.batch.job.names` are looked up in the registry instead of being autowired from the context. This is a common pattern with more complex systems, where multiple jobs are From 69d9b7a813c5c8c45063a3e906372793f6a49720 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Sun, 4 Nov 2018 07:59:26 +0100 Subject: [PATCH 2/2] Polish contribution Closes gh-15081 --- .../spring-boot-docs/src/main/asciidoc/howto.adoc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/howto.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/howto.adoc index 0902cebd368..c0e2ceb1faa 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/howto.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/howto.adoc @@ -2378,7 +2378,15 @@ By default, it executes *all* `Jobs` in the application context on startup (see for details). You can narrow down to a specific job or jobs by specifying `spring.batch.job.names` (which takes a comma-separated list of job name patterns). -Unlike command line option arguments (which starts with `--`, e.g. `--spring=batch`) job parameters has to be passed without dashes to job (e.g. `spring=batch`). +[TIP] +.Specifying job parameters on the command line +==== +Unlike command line option arguments that +<> (i.e. by starting with `--`, such as +`--my-property=value`), job parameters have to be specified on the command line without +dashes (e.g. `jobParam=value`). +==== If the application context includes a `JobRegistry`, the jobs in `spring.batch.job.names` are looked up in the registry instead of being autowired from the