How to Replace a Bean During Startup In Spring
There are circumstances in that we need to override a bean's methods which is from an external package but keep the same bean name. We can achieve this by replacing bean definition during application startup using BeanFactoryPostProcessor.
BeanFactoryPostProcessor
A BeanFactoryPostProcessor may interact with and modify bean definitions, but