16. spring的监听器

Spring的监听器是基于观察者模式

 

如何利用ApplicationContextAware,ApplicationListener,ApplicationEvent等接口实现自定义事件以及事件监听

https://blog.csdn.net/blueboz/article/details/49949573

 

Spring中定义好的几种事件
ContextClosedEvent(容器关闭时) 
ContextRefreshedEvent(容器刷新是) 
ContextStartedEvent(容器启动时候) 
ContextStoppedEvent(容器停止的时候)

 

扩展:

ServletContextListener接口

Spring MVC中常用的监听器

 

posted @ 2018-07-22 19:49  冷漠不是我的本意  阅读(426)  评论(0编辑  收藏  举报