spring启动时初始化配置spring启动时初始化配置
spring启动时初始化配置在使用spring的项目,在启动tomcat时,在启动时需要加载某些配置文件,和初始化一些配置方法有很多,在这里介绍其中一种。编写类实现ApplicationListener接口,重写方法onApplicationEvent()方法如下:public void onApplicationEvent(ContextRefreshedEvent event) { ...