老师你好。在做4-9前端设计的时候发现无法访问shopoperation.html。直接放在webapp根目录下也无法访问的,不过可以访问webapp根目录下的.jsp文件。同样放在/WEB-INFO/html/shop/目录下,也是无法访问的,提示警告: No mapping found for HTTP request with URI [/SSM/WEB-INF/html/shop/shopoperation.html] in DispatcherServlet with name 。同样把jsp文件放在该/shop目录下,做相应修改,也是可以被访问的。好像问题出在html没有访问的。如果把web.xml的servlet配置去掉后,html在webapp根目录下就可以访问了。有配置servlet(和老师的差不多),直接访问webapp下的提示警告: No mapping found for HTTP request with URI [/SSM/hello.html] in DispatcherServlet with name 'spring-dispatcher',也被servlet拦截了。已经clean了工程和tomcat了。求提供排查的思路。下面是控制台打印的信息:
信息: Initializing Spring FrameworkServlet 'spring-dispatcher'
三月 08, 2018 10:32:40 上午 org.springframework.web.servlet.DispatcherServlet initServletBean
信息: FrameworkServlet 'spring-dispatcher': initialization started
三月 08, 2018 10:32:40 上午 org.springframework.web.context.support.XmlWebApplicationContext prepareRefresh
信息: Refreshing WebApplicationContext for namespace 'spring-dispatcher-servlet': startup date [Thu Mar 08 10:32:40 CST 2018]; root of context hierarchy
三月 08, 2018 10:32:40 上午 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
信息: Loading XML bean definitions from file [F:\java_workplace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\SSM\WEB-INF\classes\spring\spring-dao.xml]
三月 08, 2018 10:32:41 上午 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
信息: Loading XML bean definitions from file [F:\java_workplace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\SSM\WEB-INF\classes\spring\spring-service.xml]
三月 08, 2018 10:32:41 上午 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
信息: Loading XML bean definitions from file [F:\java_workplace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\SSM\WEB-INF\classes\spring\spring-web.xml]
三月 08, 2018 10:32:42 上午 com.mchange.v2.log.MLog <clinit>
信息: MLog clients using java 1.4+ standard logging.
三月 08, 2018 10:32:42 上午 com.mchange.v2.c3p0.C3P0Registry banner
信息: Initializing c3p0-0.9.1.2 [built 21-May-2007 15:04:56; debug? true; trace: 10]
三月 08, 2018 10:32:43 上午 org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping register
信息: Mapped "{[/shopaccess/test]}" onto public java.lang.String com.justin.ssm.web.shopadmin.ShopAccess.acces()
三月 08, 2018 10:32:43 上午 org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping register
信息: Mapped "{[/shopadmin/registershop],methods=[POST]}" onto private java.util.Map<java.lang.String, java.lang.Object> com.justin.ssm.web.shopadmin.ShopManagementController.registerShop(javax.servlet.http.HttpServletRequest)
三月 08, 2018 10:32:43 上午 org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping register
信息: Mapped "{[/superadmin/listarea],methods=[GET]}" onto private java.util.Map<java.lang.String, java.lang.Object> com.justin.ssm.web.superadmin.AreaController.listArea()
三月 08, 2018 10:32:43 上午 org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter initControllerAdviceCache
信息: Looking for @ControllerAdvice: WebApplicationContext for namespace 'spring-dispatcher-servlet': startup date [Thu Mar 08 10:32:40 CST 2018]; root of context hierarchy
三月 08, 2018 10:32:44 上午 org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter initControllerAdviceCache
信息: Looking for @ControllerAdvice: WebApplicationContext for namespace 'spring-dispatcher-servlet': startup date [Thu Mar 08 10:32:40 CST 2018]; root of context hierarchy
三月 08, 2018 10:32:44 上午 org.springframework.web.servlet.handler.SimpleUrlHandlerMapping registerHandler
信息: Mapped URL path [/resources/] onto handler 'org.springframework.web.servlet.resource.ResourceHttpRequestHandler#0'
三月 08, 2018 10:32:44 上午 org.springframework.web.servlet.DispatcherServlet initServletBean
信息: FrameworkServlet 'spring-dispatcher': initialization completed in 4091 ms
三月 08, 2018 10:32:44 上午 org.springframework.web.servlet.PageNotFound noHandlerFound
警告: No mapping found for HTTP request with URI [/SSM/] in DispatcherServlet with name 'spring-dispatcher'
三月 08, 2018 10:32:54 上午 org.springframework.web.servlet.PageNotFound noHandlerFound
警告: No mapping found for HTTP request with URI [/SSM/hello.html] in DispatcherServlet with name 'spring-dispatcher'
SSM商铺V1.0,解决毕设痛点;SpringBoot商铺V2.0,满足工作刚需
了解课程