1.实现ApplicationListener接口,并重写onApplicationEvent方法 @Component public class RSAKeyInitListener implements ApplicationListener<ContextRefreshedEvent> { @Autowired BaseAppConfigDao baseAppConfigDao; @Override public void onApplicationEvent(ContextRefres…