天天看點

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

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

場景:IDEA,maven,多子產品,SSM

在更改pom檔案中的jar包時,出現報錯,如圖

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

解決辦法:打開Project Structure—Artifacts—Output Layout

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

把圖中的顯示紅色的包都Remove掉

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

在右鍵項目,點選Put into Output Root

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

然後在點選Apply—OK,就可以啦。

此解決方案,僅供參考哈。我是這樣就可以了。