启动tomcat时,发现出现了  java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

maven项目,在依赖中,发现有加spring-web的依赖,检查了配置文件发现也没出现错误。

最后通过更好配置解决。

打开File > Project Structure > Artifacts 

java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener错误的解决办法

右键选 Put into Output Root

java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener错误的解决办法

会发现在左侧web-inf下生成了lib文件夹,点开看到里面是我们在项目里加的依赖。

完成点ok,重新启动tomcat,完美解决


相关文章:

  • 2022-01-15
  • 2022-12-23
  • 2022-12-23
  • 2021-05-12
  • 2021-07-11
  • 2022-12-23
  • 2021-12-19
  • 2021-10-01
猜你喜欢
  • 2021-12-20
  • 2021-09-21
  • 2022-01-08
  • 2022-12-23
  • 2021-06-21
  • 2021-05-13
相关资源
相似解决方案