26. Intellij IDEA 启动项目ClassNotFoundException

转自:https://blog.csdn.net/zhw0596/article/details/81388147

使用Intellij IDEA  的过程中,新创建的项目启动时报

严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener

java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

原因之一jar包未被部署:

ctrl+shift+alt+s打开项目设置窗口,选择Artifacts,选择打包部署项目,选择Output Layout--》Web-INF,查看下面是否有lib目录,右边的jar包是否添加到lib目录下。

详情如下图:

原文地址:https://www.cnblogs.com/sharpest/p/7850703.html