SpringMVC Maven ContextLoaderListener错误配置解决

来源:互联网 发布:破解版聊天室软件 编辑:程序博客网 时间:2024/05/17 22:50

1、环境

SpringMVC + Maven + mybatis

2、报错提示

严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

...略

3、分析原因

用于项目用eclipse控制台的server->tomcat发布后,报上述错误,并发现在D:\tools\tomcat7.0.55\webapps\项目名\WEB-INF没有lib包,考虑是SpringMVC 的jar包未导入产生的。

4、处理办法

eclipse中右键项目->properties->Deployment Assembly,添加maven依赖包即可

如图:


0 0
原创粉丝点击