验证报404错误

来源:2-10 验证Controller

weixin_慕尼黑3418572

2019-09-02

九月 02, 2019 9:46:52 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version: Apache Tomcat/8.5.43
九月 02, 2019 9:46:52 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server built: Jul 4 2019 20:53:15 UTC
九月 02, 2019 9:46:52 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server number: 8.5.43.0
九月 02, 2019 9:46:52 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name: Windows 10
九月 02, 2019 9:46:52 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Version: 10.0
九月 02, 2019 9:46:52 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Architecture: amd64
九月 02, 2019 9:46:52 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java Home: D:\JAVA\JDK8\jre
九月 02, 2019 9:46:52 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Version: 1.8.0_221-b11
九月 02, 2019 9:46:52 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Vendor: Oracle Corporation
九月 02, 2019 9:46:52 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE: D:\XM.metadata.plugins\org.eclipse.wst.server.core\tmp0
九月 02, 2019 9:46:52 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME: D:\apache-tomcat-8.5.43-windows-x64\apache-tomcat-8.5.43
九月 02, 2019 9:46:52 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=D:\XM.metadata.plugins\org.eclipse.wst.server.core\tmp0
九月 02, 2019 9:46:52 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=D:\apache-tomcat-8.5.43-windows-x64\apache-tomcat-8.5.43
九月 02, 2019 9:46:52 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dwtp.deploy=D:\XM.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps
九月 02, 2019 9:46:52 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.endorsed.dirs=D:\apache-tomcat-8.5.43-windows-x64\apache-tomcat-8.5.43\endorsed
九月 02, 2019 9:46:52 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dfile.encoding=GBK
九月 02, 2019 9:46:52 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [D:\JAVA\JDK8\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;D:/JAVA/JDK8/bin/…/jre/bin/server;D:/JAVA/JDK8/bin/…/jre/bin;D:/JAVA/JDK8/bin/…/jre/lib/amd64;D:\app\moon_\product\11.2.0\dbhome_1\bin;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Intel\Intel® Management Engine Components\DAL;C:\Program Files\Intel\Intel® Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel® Management Engine Components\IPT;C:\Program Files\Intel\Intel® Management Engine Components\IPT;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;D:\JAVA\JDK8\bin;;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Users\moon_\AppData\Local\Microsoft\WindowsApps;D:\JAVA\JDK8\bin;“D:\apache-tomcat-8.5.43-windows-x64\apache-tomcat-8.5.43\bin;D:\apache-tomcat-8.5.43-windows-x64\apache-tomcat-8.5.43\lib”;D:\apache-maven-3.6.1-bin\apache-maven-3.6.1\bin;D:\cmsservice\MongoDB\bin;;C:\Users\moon_\Desktop;;.]
九月 02, 2019 9:46:52 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler [“http-nio-8080”]
九月 02, 2019 9:46:52 下午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
信息: Using a shared selector for servlet write/read
九月 02, 2019 9:46:52 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler [“ajp-nio-8009”]
九月 02, 2019 9:46:52 下午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
信息: Using a shared selector for servlet write/read
九月 02, 2019 9:46:52 下午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 619 ms
九月 02, 2019 9:46:52 下午 org.apache.catalina.core.StandardService startInternal
信息: Starting service [Catalina]
九月 02, 2019 9:46:52 下午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/8.5.43
九月 02, 2019 9:46:54 下午 org.apache.catalina.core.ApplicationContext log
信息: No Spring WebApplicationInitializer types detected on classpath
九月 02, 2019 9:46:54 下午 org.apache.jasper.servlet.TldScanner scanJars
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
九月 02, 2019 9:46:54 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler [“http-nio-8080”]
九月 02, 2019 9:46:54 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler [“ajp-nio-8009”]
九月 02, 2019 9:46:54 下午 org.apache.catalina.startup.Catalina start
信息: Server startup in 1615 ms
九月 02, 2019 9:47:41 下午 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring FrameworkServlet 'spring-dispatcher’
九月 02, 2019 9:47:41 下午 org.springframework.web.servlet.DispatcherServlet initServletBean
信息: FrameworkServlet ‘spring-dispatcher’: initialization started
九月 02, 2019 9:47:41 下午 org.springframework.web.context.support.XmlWebApplicationContext prepareRefresh
信息: Refreshing WebApplicationContext for namespace ‘spring-dispatcher-servlet’: startup date [Mon Sep 02 21:47:41 CST 2019]; root of context hierarchy
九月 02, 2019 9:47:41 下午 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
信息: Loading XML bean definitions from file [D:\XM.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\o2o\WEB-INF\classes\spring\spring-dao.xml]
九月 02, 2019 9:47:41 下午 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
信息: Loading XML bean definitions from file [D:\XM.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\o2o\WEB-INF\classes\spring\spring-service.xml]
九月 02, 2019 9:47:41 下午 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
信息: Loading XML bean definitions from file [D:\XM.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\o2o\WEB-INF\classes\spring\spring-web.xml]
21:47:42.270 [http-nio-8080-exec-3] DEBUG org.apache.ibatis.logging.LogFactory - Logging initialized using ‘class org.apache.ibatis.logging.slf4j.Slf4jImpl’ adapter.
21:47:42.277 [http-nio-8080-exec-3] DEBUG org.mybatis.spring.mapper.ClassPathMapperScanner - Creating MapperFactoryBean with name ‘areaDao’ and ‘com.imooc.o2o.dao.AreaDao’ mapperInterface
21:47:42.376 [MLog-Init-Reporter] INFO com.mchange.v2.log.MLog - MLog clients using slf4j logging.
21:47:42.388 [MLog-Init-Reporter] DEBUG com.mchange.v2.log.MLog - Reading VM config for path list /com/mchange/v2/log/default-mchange-log.properties, /mchange-commons.properties, /c3p0.properties, hocon:/reference,/application,/c3p0,/, /mchange-log.properties, /
21:47:42.388 [MLog-Init-Reporter] DEBUG com.mchange.v2.log.MLog - The configuration file for resource identifier ‘/mchange-commons.properties’ could not be found. Skipping.
21:47:42.388 [MLog-Init-Reporter] DEBUG com.mchange.v2.log.MLog - The configuration file for resource identifier ‘/c3p0.properties’ could not be found. Skipping.
21:47:42.388 [MLog-Init-Reporter] DEBUG com.mchange.v2.log.MLog - The configuration file for resource identifier ‘hocon:/reference,/application,/c3p0,/’ could not be found. Skipping.
21:47:42.388 [MLog-Init-Reporter] DEBUG com.mchange.v2.log.MLog - The configuration file for resource identifier ‘/mchange-log.properties’ could not be found. Skipping.
21:47:42.389 [http-nio-8080-exec-3] DEBUG com.mchange.v2.cfg.MConfig - The configuration file for resource identifier ‘/mchange-commons.properties’ could not be found. Skipping.
21:47:42.389 [http-nio-8080-exec-3] DEBUG com.mchange.v2.cfg.MConfig - The configuration file for resource identifier ‘/mchange-log.properties’ could not be found. Skipping.
21:47:42.389 [http-nio-8080-exec-3] DEBUG com.mchange.v2.cfg.MConfig - The configuration file for resource identifier ‘hocon:/reference,/application,/c3p0,/’ could not be found. Skipping.
21:47:42.389 [http-nio-8080-exec-3] DEBUG com.mchange.v2.cfg.MConfig - The configuration file for resource identifier ‘/c3p0.properties’ could not be found. Skipping.
21:47:42.421 [http-nio-8080-exec-3] INFO com.mchange.v2.c3p0.C3P0Registry - Initializing c3p0-0.9.5.4 [built 23-March-2019 23:00:48 -0700; debug? true; trace: 10]
21:47:42.443 [http-nio-8080-exec-3] DEBUG com.mchange.v2.c3p0.management.DynamicPooledDataSourceManagerMBean - MBean: com.mchange.v2.c3p0:type=PooledDataSource,identityToken=1hge0yua41v7kwqx1tb5qvo|95a553d,name=1hge0yua41v7kwqx1tb5qvo|95a553d registered.
21:47:42.458 [http-nio-8080-exec-3] DEBUG com.mchange.v2.c3p0.management.DynamicPooledDataSourceManagerMBean - MBean: com.mchange.v2.c3p0:type=PooledDataSource,identityToken=1hge0yua41v7kwqx1tb5qvo|95a553d,name=1hge0yua41v7kwqx1tb5qvo|95a553d unregistered, in order to be reregistered after update.
21:47:42.459 [http-nio-8080-exec-3] DEBUG com.mchange.v2.c3p0.management.DynamicPooledDataSourceManagerMBean - MBean: com.mchange.v2.c3p0:type=PooledDataSource,identityToken=1hge0yua41v7kwqx1tb5qvo|95a553d,name=1hge0yua41v7kwqx1tb5qvo|95a553d registered.
21:47:42.658 [http-nio-8080-exec-3] DEBUG org.mybatis.spring.SqlSessionFactoryBean - Parsed configuration file: 'class path resource [mybatis-config.xml]'
21:47:42.722 [http-nio-8080-exec-3] DEBUG org.mybatis.spring.SqlSessionFactoryBean - Parsed mapper file: 'file [D:\XM.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\o2o\WEB-INF\classes\mapper\AreaDao.xml]'
九月 02, 2019 9:47:43 下午 org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter initControllerAdviceCache
信息: Looking for @ControllerAdvice: WebApplicationContext for namespace ‘spring-dispatcher-servlet’: startup date [Mon Sep 02 21:47:41 CST 2019]; root of context hierarchy
九月 02, 2019 9:47:43 下午 org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter initControllerAdviceCache
信息: Looking for @ControllerAdvice: WebApplicationContext for namespace ‘spring-dispatcher-servlet’: startup date [Mon Sep 02 21:47:41 CST 2019]; root of context hierarchy
九月 02, 2019 9:47:43 下午 org.springframework.web.servlet.handler.SimpleUrlHandlerMapping registerHandler
信息: Mapped URL path [/resources/] onto handler 'org.springframework.web.servlet.resource.ResourceHttpRequestHandler#0’
九月 02, 2019 9:47:43 下午 org.springframework.web.servlet.handler.SimpleUrlHandlerMapping registerHandler
信息: Mapped URL path [/
] onto handler 'org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler#0’
九月 02, 2019 9:47:43 下午 org.springframework.web.servlet.DispatcherServlet initServletBean
信息: FrameworkServlet ‘spring-dispatcher’: initialization completed in 1880 ms

写回答

1回答

翔仔

2019-09-02

同学好,贴的信息并没有错误呢,因此光通过这些信息没发定位。一般404就是资源加载不到。

请检查

  1. controller路径是否配对

  2. 访问路径是否正确

  3. Spring-web.xml是否配置正确,尤其是包的扫描是否是com.imooc.o2o.web

  4. pom.xml是否配置正确,是否缺少jar

请按照四点去检查


0
0

Java双版本(SSM到SpringBoot)校园商铺全栈开发

SSM商铺V1.0,解决毕设痛点;SpringBoot商铺V2.0,满足工作刚需

5113 学习 · 8144 问题

查看课程