重装系统和软件后,在调试Maven项目时,Eclipse环境下遇到这个问题:
严重: 配置应用程序监听器[org.springframework.web.context.ContextLoaderListener]错误
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
一般是Maven项目出现这情况,报错原因是没加入maven的jar包到编译中来
解决办法:
1、右击报错的项目,右键项目选择底部的properties。
2、选择左侧菜单栏中的Deployment下的Deployment Assembly,点击右侧“add”,再选择
Java Build Path Entries。
3、选择Maven Dependencies,再点击“NEXT”。