如何在项目中添加SpringBoot监听器
@Component public class NettyBootstrap implements ApplicationListener<ContextRefreshedEvent> { @Override public void onApplicationEvent(ContextRefreshedEvent event) { if(event.getApplicationContext().getParent() == null){ try { //说明SpringApplication已经启动完毕 WSServer.getInstance().start(); } catch (Exception e) { e.printStackTrace(); } } } }