ApplicationListener是spring提供的接口,作用是在web服务器启动时去加载某些程序. 用法: 1.实现ApplicationListener接口,并重写onApplicationEvent方法 @Component public class StartLoader implements ApplicationListener<ContextRefreshedEvent> { @Override public void onApplicationEvent(ContextR
1.实现ApplicationListener接口,并重写onApplicationEvent方法 @Component public class RSAKeyInitListener implements ApplicationListener<ContextRefreshedEvent> { @Autowired BaseAppConfigDao baseAppConfigDao; @Override public void onApplicationEvent(ContextRefres