• 在用eclipse创建完SpringMVC案例后,配置文件都没有错,启动Tomcat就报错!!!


    java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet
        at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1360)
        at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1182)
        at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:546)
        at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:527)
        at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:150)
        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1044)
        at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:763)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:134)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:528)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
        at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:798)
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:810)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:748)

    解决方案:

    在项目上右键properties(最后一项),打开如下界面

    Add -> Java Build Path Entries -> Next -> Maven Dependencies -> Finish -> Ok,配置完后如下图:

  • 相关阅读:
    videojs 隐藏videobar
    nw 系统托盘的添加方式,以及ajax失效问题
    nw 注册快捷键
    bg-script 错误信息显示,以及global
    input 文件上传
    git stash,git cherry-pick
    安装Laravel
    nw + iframe嵌入page 滚动条问题
    require('nw.gui') 失效问题
    dell 交换机 双链路冗余
  • 原文地址:https://www.cnblogs.com/wangrui-liyin/p/11973264.html
Copyright © 2020-2023  润新知