-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
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.