SpringMVC+Spring+MyBatis+Maven启动报错:ContextLoaderListener java.lang.ClassNotFoundException

这个错误在项目中之前也出现过,花了一些时间也整理过,也解决过,这次自己做小项目练习时候,恰巧又遇到这个错误。这次对这个错误做个总结:
严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
SpringMVC+Spring+MyBatis+Maven启动报错:ContextLoaderListener java.lang.ClassNotFoundException

解决这个问题的方式:
**第一种情况**MyEclipse编译器
右键项目,1.选择–>>Properties
2.找到MyEclipse下的 Deployment Assembly
3.点击右侧的 Add按钮
4.选择JavaBuild Path Entries
5.点击Next,选择Maven Dependencies
6.点击Finish
完成。然后重新启动服务器就可以解决问题了。

**第二种情况**Eclipse编译器
右键项目,1.选择–>>Properties
2.直接选择 Deployment Assembly
3.点击右侧的 Add按钮
4.选择JavaBuild Path Entries
5.点击Next,选择Maven Dependencies
6.点击Finish
完成。然后重新启动服务器就可以解决问题了。

SpringMVC+Spring+MyBatis+Maven启动报错:ContextLoaderListener java.lang.ClassNotFoundException

至此,这个问题解决。