IDEA开发报错: java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

mac2025-07-18  6

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

在IDEA中点击File > Project Structure > Artifacts > 在右侧Output Layout右击项目名,选择Put into Output Root。

​执行后,在WEB-INF在增加了lib目录,里面是项目引用的jar包,点击OK。​然后重启Tomcat即可

DispacherServlet错误也可以使用上面的方法解决。

最新回复(0)