您的位置:首页 > 编程语言 > Java开发

Maven java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListene

2016-03-08 15:24 169 查看
Eclispe中的maven项目使用的框架:spring+struts2+ibatis,报这个错:
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

但这个包确实已经引入了,但是它却一直找不到,原因是少了一个设置,解决方法如下:

1. Add maven dependencies

Right click the web project “properties” -------> click the “Deployment Assembly” ---->

Click add button
Choose Java Build Path Entires ---> click Next

Choose Maven Dependencies------> Finish

2. Add project dependencies

Click add button

Choose Project-----> Click Next button

Choose your dependencies project -----> Click Finish button

对于这个错误 ,我用方案1解决了问题(方案2是百度到的另一个方法,没试过~~)。记性不好,所以记录下来,,以便以后借鉴,同时也与大家共享
^_^
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: