Tomcat启动Maven项目时报错:ContextLoaderListener、WebAppRootListener两个监听器找不到
项目环境:jdk1.8、spring+springMVC+Mybatis、Tomcat8.5
报错背景:Maven项目部署到tamcat上启动时报错误
org.springframework.web.context.ContextLoaderListener
org.springframework.web.util.WebAppRootListener
这两个类报notnullClassException.
解决方式:
右击项目–>>propertice–>>Deployment Assembly–>>add
把这里的全部东西都选择添加–>>完成
效果:
主要就是Maven Dependencies这个要出现;点击apply and close就可以了,重启服务器不再报错就ok了!