在eclipse中运行,SpringApplication.run之后的代码是可以执行的,但是放在tomcat中运行不行。

实现 ApplicationListener<ContextRefreshedEvent> 来实现。

@Component
public class StartSysListener implements ApplicationListener<ContextRefreshedEvent> {



}

相关文章:

  • 2021-08-13
  • 2022-12-23
  • 2021-07-06
  • 2021-11-17
  • 2022-12-23
  • 2021-12-10
  • 2022-12-23
  • 2021-08-02
猜你喜欢
  • 2022-12-23
  • 2021-12-11
  • 2022-12-23
  • 2022-02-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案