I am new to Spring and I need some help to understand the following:
Here's what I know:
BeanFactoryPostProcessors affects BeanDefinition objects because they are run right after your configuration is read in. There are no bean instances created yet. So it can’t do anything to your objects instances yet.
postProcessBeforeInitialization defined in the BeanPostProcessor gets called (as the name indicates) before the initialization of beans
Question:
If the above is true, which means if both are called before initialization, then how is BeanFactoryPostProcessor different from the postProcessBeforeInitialization method of BeanPostProcessor ? Also, I would appreciate if you can provide a real life example of how both are used and how to decide which one to use, when. Thanks.