其他分享
首页 > 其他分享> > SpringBean单监听事件

SpringBean单监听事件

作者:互联网

beanFactoryPostProcess

LD is tigger forever,CG are not brothers forever, throw the pot and shine forever.
Modesty is not false, solid is not naive, treacherous but not deceitful, stay with good people, and stay away from poor people.
talk is cheap, show others the code and KPI, Keep progress,make a better result.
Survive during the day and develop at night。

目录

概 述

BeanFacotyryPostProcessor
基于事件驱动开发,测试一下这潜艇容器中发布的事件,完成事件驱动的,
实现一个监听器过程:
实现MyAppationListerner 当容器中发布,此事件以后,方法触发,容器中发布那些方法:
收到的事件,进行测试,能不能收到事件,收到事件,ContextRe刷新治时间,
只要IOC容器,自己发布事件,
1.写一个监听器,舰艇每个事件,下面的Appcaliton 及其子类
2.容器中相应的事件发布
3.我们的就能监听到这个事件,
4.容器刷新完成事件。
5.刷新完成进行完成成这个事件
contextCLosedEvent关闭容器会发布这个事件
发布一个事件,在容器里面发布publichs传入一个对象,发布一个事件,看一下
我们收到applicationContext 的事件,就会毁掉打印的,

小结

参考资料和推荐阅读

1.链接: link.

标签:容器,forever,SpringBean,收到,发布,事件,监听器,监听
来源: https://blog.csdn.net/xiamaocheng/article/details/122764412