啓動監聽ApplicationListener與CommandLineRunner

須要在項目啓動時作一下其餘工做。因而新寫一個監聽繼承了ApplicationListener接口。實現其onApplicationEvent方法html @Component public class InitListener implements ApplicationListener<ApplicationReadyEvent> { //public class InitListener im
相關文章
相關標籤/搜索