maven工程启动报错。

来源:互联网 发布:js dateadd函数 编辑:程序博客网 时间:2024/06/03 18:16

springmvc+maven的项目,启动后访问的时候一直报找不到     org.springframework.web.servlet.DispatcherServlet

可见 启动成功, 但是class没有发布出去。

工程-右键-Deployment Assembly-add-Maven Dependencies


正常的话 , 这里就可以了。


不幸的是, 我添加完就报 

Publishing failed 
Could not publish to the server. 
java.lang.IndexOutOfBoundsException


原因是maven仓库的包有错,全删掉,重新update project ,启动后正常运行!

0 0