Skip to content

Make JobRegistry optional in the default batch configuration #4971

@fmbenhassine

Description

@fmbenhassine

In #4855 , the job registry was made smart enough to populate itself with jobs from the application context. This eliminated the need to define an additional JobRegistryBeanPostProcessor or JobRegistrySmartInitializingBean, which simplified the batch configuration. However, for that to work, the job registry should be defined as a bean to honour the SmartInitializingBean contract and be auto-populated with jobs.

This is actually not required. The job operator can be initialised with an internal job registry and customized with a user-defined one if needed. The default registry could be populated with jobs defined in the application context to simplify the configuration even more. The job operator factory bean is a good place for this initialisation to happen.

Metadata

Metadata

Assignees

Labels

in: corestatus: for-internal-teamIssues that are planned to be resolved by the Spring Batch team, and not open for contributions.type: feature

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions