Introduce supports() method in BeanPostProcessor #28645
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: declined
A suggestion or change that we don't feel we should currently apply
When writing an implementation class for the
BeanPostProcessor
interface, you usually have the following code:The
BeanPostProcessor
interface implementation class needs to enter this code each time it passes through each if block, and some of these entries don't do anything to the bean object, but return it directly.Maybe the
BeanPostProcessor
interface can have asupports()
method to judge whether to support processing in thepostProcessBeforeInitialization
method.The improved code is as follows.
The text was updated successfully, but these errors were encountered: