eclispe中的maven項目使用Spring整合Struts2時,報java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener。但我能夠百分百肯定這個包已經引入了,可是它卻一直找不到,後來百度到了一篇帖子,找到了解決辦法,以下: html
1. Add maven dependencies java
Right click the web project 「properties」 -------> click the 「Deployment Assembly」 ----> web
Click add button spring
Choose Java Build Path Entires ---> click Next maven
Choose Maven Dependencies------> Finish ui
2. Add project dependencies url
Choose Project-----> Click Next button orm
Choose your dependencies project -----> Click Finish button htm
That’s ok!