肥宅兜

导航

2016年10月14日 #

Spring透过ApplicationListener来触发contextrefreshedevent事件

摘要: Spring通过ApplicationListener接口来触发contextrefreshedevent事件在开发时有时候需要在整个应用开始运行时执行一些特定代码,比如初始化环境,准备测试数据、加载一些数据到内存等等。在Spring中可以通过ApplicationListener来实现相关的功能, 阅读全文

posted @ 2016-10-14 22:45 肥宅兜 阅读(7690) 评论(1) 推荐(0) 编辑