项目中有个功能是main方法启动的,放在web项目中,需要项目启动自动开启thrift服务,spring配置init-method自动加载bean不生效,找了半天原因,原来是web.xml配置少了个load-on-startup,加上后自动运行成功!

spring web项目tomcat启动不自动加载配置文件中的Bean,第一次访问才开始加载

相关文章:

  • 2021-10-12
  • 2022-12-23
  • 2021-04-19
  • 2021-05-20
  • 2021-08-01
  • 2021-06-24
  • 2021-07-04
猜你喜欢
  • 2021-08-05
  • 2021-08-14
  • 2022-12-23
  • 2022-12-23
  • 2021-04-19
  • 2021-07-27
  • 2021-05-30
相关资源
相似解决方案