@ruoli
2017-06-21T11:15:56.000000Z
字数 395
阅读 1557
SpringBoot
实现接口即可
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;
@Component
public class ApplicationStartup implements ApplicationListener<ApplicationReadyEvent> {
@Override
public void onApplicationEvent(ApplicationReadyEvent arg0) {
System.out.println("默认启动执行...");
}
}