Improve the process of job registration
This commit changes the way of populating the default job registry from using a BeanPostProcessor to using a JobRegistrySmartInitializingSingleton. This change resolves warnings about beans being eagerly injected into currently created BeanPostProcessors and prevents lifecycle issues about early bean initializations. It also deprecates JobRegistryBeanPostProcessor in favor of JobRegistrySmartInitializingSingleton. Resolves #4547
This commit is contained in:
@@ -222,7 +222,12 @@ example has been given an `id` so that it can be included in child
|
||||
contexts (for example, as a parent bean definition) and cause all jobs created
|
||||
there to also be registered automatically.
|
||||
|
||||
As of version 5.1, the `@EnableBatchProcessing` annotation automatically registers a `jobRegistryBeanPostProcessor` bean in the application context.
|
||||
[WARNING]
|
||||
.Deprecation
|
||||
====
|
||||
As of version 5.2, the `JobRegistryBeanPostProcessor` class is deprecated in favor of
|
||||
`JobRegistrySmartInitializingSingleton`, see xref:#jobregistrysmartinitializingsingleton[JobRegistrySmartInitializingSingleton].
|
||||
====
|
||||
|
||||
[[jobregistrysmartinitializingsingleton]]
|
||||
=== JobRegistrySmartInitializingSingleton
|
||||
|
||||
Reference in New Issue
Block a user