启动时:[INFO] --- tomcat7-maven-plugin:2.2:run (default-cli) @ taotao-web ---
[INFO] Running war on http://localhost:8080/taotao-web
[INFO] Using existing Tomcat server configuration at D:\Program Files\MyEclipse 2014\Workspaces\taotaoManager\taotao-web\target\tomcat
[INFO] create webapp with contextPath: /taotao-web
三月 25, 2017 7:27:43 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-bio-8080"]
三月 25, 2017 7:27:43 下午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Tomcat
三月 25, 2017 7:27:43 下午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/7.0.47
三月 25, 2017 7:27:48 下午 org.apache.catalina.core.ApplicationContext log
信息: No Spring WebApplicationInitializer types detected on classpath
三月 25, 2017 7:27:48 下午 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring root WebApplicationContext
三月 25, 2017 7:27:48 下午 org.springframework.web.context.ContextLoader initWebApplicationContext
信息: Root WebApplicationContext: initialization started
三月 25, 2017 7:27:48 下午 org.springframework.web.context.support.XmlWebApplicationContext prepareRefresh
信息: Refreshing Root WebApplicationContext: startup date [Sat Mar 25 19:27:48 CST 2017]; root of context hierarchy
三月 25, 2017 7:27:48 下午 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
信息: Loading XML bean definitions from file [D:\Program Files\MyEclipse 2014\Workspaces\taotaoManager\taotao-web\target\classes\spring\springApplication-dao.xml]
三月 25, 2017 7:27:48 下午 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
信息: Loading XML bean definitions from file [D:\Program Files\MyEclipse 2014\Workspaces\taotaoManager\taotao-web\target\classes\spring\springApplication-service.xml]
三月 25, 2017 7:27:48 下午 org.springframework.context.support.PropertySourcesPlaceholderConfigurer loadProperties
信息: Loading properties file from class path resource [resource/db.properties]
三月 25, 2017 7:27:48 下午 org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor <init>
信息: JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
三月 25, 2017 7:27:50 下午 org.springframework.web.context.ContextLoader initWebApplicationContext
信息: Root WebApplicationContext: initialization completed in 2384 ms
三月 25, 2017 7:27:50 下午 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring FrameworkServlet 'taotao-manager'
三月 25, 2017 7:27:50 下午 org.springframework.web.servlet.DispatcherServlet initServletBean
信息: FrameworkServlet 'taotao-manager': initialization started
三月 25, 2017 7:27:50 下午 org.springframework.web.context.support.XmlWebApplicationContext prepareRefresh
信息: Refreshing WebApplicationContext for namespace 'taotao-manager-servlet': startup date [Sat Mar 25 19:27:50 CST 2017]; parent: Root WebApplicationContext
三月 25, 2017 7:27:50 下午 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
信息: Loading XML bean definitions from class path resource [spring/springmvc.xml]
三月 25, 2017 7:27:50 下午 org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor <init>
信息: JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
三月 25, 2017 7:27:50 下午 org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping registerHandlerMethod
信息: Mapped "{[/item/{itemId}],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public com.taotao.pojo.TbItem com.taotao.controller.showController.getItem(java.lang.Long)
三月 25, 2017 7:27:51 下午 org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter initControllerAdviceCache
信息: Looking for @ControllerAdvice: WebApplicationContext for namespace 'taotao-manager-servlet': startup date [Sat Mar 25 19:27:50 CST 2017]; parent: Root WebApplicationContext
三月 25, 2017 7:27:51 下午 org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter initControllerAdviceCache
信息: Looking for @ControllerAdvice: WebApplicationContext for namespace 'taotao-manager-servlet': startup date [Sat Mar 25 19:27:50 CST 2017]; parent: Root WebApplicationContext
三月 25, 2017 7:27:51 下午 org.springframework.web.servlet.handler.SimpleUrlHandlerMapping registerHandler
信息: Mapped URL path [/*.html] onto handler 'org.springframework.web.servlet.resource.ResourceHttpRequestHandler#0'
三月 25, 2017 7:27:51 下午 org.springframework.web.servlet.handler.SimpleUrlHandlerMapping registerHandler
信息: Mapped URL path [/js/**] onto handler 'org.springframework.web.servlet.resource.ResourceHttpRequestHandler#1'
三月 25, 2017 7:27:51 下午 org.springframework.web.servlet.handler.SimpleUrlHandlerMapping registerHandler
信息: Mapped URL path [/css/**] onto handler 'org.springframework.web.servlet.resource.ResourceHttpRequestHandler#2'
三月 25, 2017 7:27:51 下午 org.springframework.web.servlet.DispatcherServlet initServletBean
信息: FrameworkServlet 'taotao-manager': initialization completed in 724 ms
三月 25, 2017 7:27:51 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-bio-8080"]
不能访问localhost三月 25, 2017 7:28:12 下午 org.springframework.web.servlet.PageNotFound noHandlerFound
警告: No mapping found for HTTP request with URI [/taotao-web/] in DispatcherServlet with name 'taotao-manager'
在pom文件已添加
<build>
<plugins>
<!-- 配置Tomcat插件 -->
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<url>http://127.0.0.1:8080/manager/text</url>
</configuration>
</plugin>
</plugins>
</build>
其他并没有啥报错。。急。。卡住了

解决方案 »

  1.   

    为什么不用jetty
      

  2.   

    检查一下web.xml里面的拦截器配置。
    <servlet>  
            <servlet-name>spring2</servlet-name>  
            <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>  
            <load-on-startup>1</load-on-startup>  
        </servlet>  
        <servlet-mapping>  
            <servlet-name>spring2</servlet-name>  
            <url-pattern>/</url-pattern>  
        </servlet-mapping>  
      

  3.   

    https://blog.csdn.net/qq_35288245/article/details/80484998
      

  4.   

    404是路径找不到,localhost后面还需要端口号/项目访问路径
      

  5.   

    大神,我想请教下为啥我的的项目没有出现信息: Starting ProtocolHandler ["http-bio-8080"] 
    而是[INFO] ------------------------------------------------------------------------
    [INFO] Reactor Summary:
    [INFO] 
    [INFO] small-manager ...................................... SUCCESS [ 11.056 s]
    [INFO] small-manager-pojo ................................. SUCCESS [  1.347 s]
    [INFO] small-manager-dao .................................. SUCCESS [  0.424 s]
    [INFO] small-manager-service .............................. SUCCESS [  0.492 s]
    [INFO] small-manager-interface ............................ SUCCESS [  0.570 s]
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 14.688 s
    [INFO] Finished at: 2019-04-13T06:48:19+08:00
    [INFO] Final Memory: 29M/224M
    [INFO] ------------------------------------------------------------------------Process finished with exit code 0