08-注册BeanPostProcesser

这里提到的重点是代理的创建是在 post-processors的postProcessAfterInitialization方法之后,即初始化之后。registerBeanPostProcessors(beanFactory)的方法过程。允许对新建实例的定制修改,比如检查标记接口或用代理包装他们。见名知意,在bean初始化之前处理bean。在bean初始化之后处理bean。
摘要由CSDN通过智能技术生成

1. BeanPostProcessor官方解释

Factory hook that allows for custom modification of new bean instances, e.g. checking for marker interfaces or wrapping them with proxies.

允许对新建实例的定制修改,比如检查标记接口或用代理包装他们

ApplicationContexts can autodetect BeanPostProcessor beans in their bean definitions and apply them to any beans subsequently created. Plain bean factories allow for programmatic registration of post-processors, applying to all beans created through this factory.

Typically, post-processors that populate beans via marker interfaces or the like will implement postProcessBeforeInitialization, while post-processors that wrap beans with proxies will normally implement postProcessAfterInitialization.

这里提到的重点是代理的创建是在 post-processors的postProcessAfterInitialization方法之后,即初始化之后。

2. 接口的方法

2.1 postProces

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值