引用至 Intellij IDEA 啟動項目ClassNotFoundException
使用Intellij IDEA的過程中,新創建的項目啟動時報
嚴重: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
項目中pom.xml文件中是依賴了相關Spring jar包的。
原因之一jar包未被部署:
Ctrl+Alt+Shift+s打開項目設置窗口,選擇Artifacts,選擇打包部署項目,選擇Output Layout-->Web-INF,查看下面是否有lib目錄,右邊的jar包是否添加到lib目錄下。
