1. 程式人生 > >Eclipse啟動Maven項目報java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener的錯誤

Eclipse啟動Maven項目報java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener的錯誤

ade term add listener context out contex style org

今天用Eclipse導入了一個Maven項目,啟動tomcat時卻報java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener的錯誤。

技術分享圖片

解決辦法:右鍵項目->properties->Deployment Assembly>Add->Java Build Path Entries->Next->Maven Dependencies->Finish。

重新啟動Tomcat,項目成功啟動。如果不行的話可以把project和Tomcat都Clean一下。

技術分享圖片

技術分享圖片

技術分享圖片

技術分享圖片

?技術分享圖片

Eclipse啟動Maven項目報java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener的錯誤