On this page
87. Batch Applications
This section answers questions that arise from using Spring Batch with Spring Boot.
![]() |
Note |
|---|---|
By default, batch applications require a |
For more about Spring Batch, see the Spring Batch project page .
Spring Batch auto-configuration is enabled by adding @EnableBatchProcessing (from Spring Batch) somewhere in your context.
By default, it executes all Jobs in the application context on startup (see JobLauncherCommandLineRunner 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).
![]() |
Specifying job parameters on the command line |
|---|---|
Unlike command line option arguments that set properties in the |
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 defined in child contexts and registered centrally.
See BatchAutoConfiguration and @EnableBatchProcessing for more details.
![[Note]](/images/spring-boot/2.1.1.RELEASE/note.png)
![[Tip]](/images/spring-boot/2.1.1.RELEASE/tip.png)