SpringBoot之自定义注解(基于BeanPostProcessor接口实现)
步骤
使用@interface 自定义注解
编写注解处理类,实现BeanPostProcessor接口
原理实现BeanPostProcessor接口的类即为Bean后置处理器,Spring加载机制会在所有Bean初始化的时候遍历调用每个Bean后置处理器。其顺序为:Bean实例化-》依赖注入-》
...