解决maven jar包打包不到tomcat下

来源:互联网 发布:我的世界pe小地图js 编辑:程序博客网 时间:2024/06/15 17:12

闲暇时用Myeclipse自己搭架了个maven小项目,搭架完毕启动之后,项目直接起不来,说找不到监听

class:org.springframework.web.context.ContextLoaderListener

首先:怀疑是否没导入jar包,在pom.xml 中检查spring-web的jar是已经导入的,并且 在web.xml 中 只可以ctrl+左键 点入的,证明jar包确认导入

然后:怀疑服务器上没有jar包,上tomcat查看项目果然没有jar包,  本地的maven jar包未打包上tomcat


解决办法:

在myeclipse中:项目右键-->properties-->Myeclipst-->Deployment Assembly 

选择add-->java build path entries -->maven Dependencies

在eclipse  中  :项目右键-->properties-->Deployment Assembly 

重启服务:OK 一切搞定

0 0
原创粉丝点击