"Mapping" SPRINGMVC annotations mapping issues that are not valid

Source: Internet
Author: User


SPRINGMVC always unable to load annotations map, workaround
 August 11, 2015 8:24:42 pm org.springframework.web.servlet.DispatcherServlet Initservletbean info: Frameworkservlet ' Mvc-dispatcher ': Initialization started August 11, 2015 8:24:42 PM Org.springframework.web.context.support.XmlWebApplicationContext Preparerefresh Info: Refreshing Webapplicationcontext for namespace ' Mvc-dispatcher-servlet ': startup date [Tue 20:24:42 CST 2015]; Parent:root Webapplicationcontext August 11, 2015 8:24:42 PM Org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadbeandefinitions Info: Loading XML Bean definitions From ServletContext resource [/web-inf/mvc-dispatcher-servlet.xml] August 11, 2015 8:24:43 PM Org.springframework.web.servlet.handler.SimpleUrlHandlerMapping Registerhandler Info: Mapped URL path [/**] onto handler ' Org.springframework.web.servlet.resource.resourcehttprequesthandler#0 ' August 11, 2015 8:24:43 PM Org.springframework.web.servlet.DispatcherServlet Initservletbean Info: Frameworkservlet ' mvc-dispatcher ': Initialization completed in 702 MS 

Add <mvc:annotation-driven/> in Mvc-dispatcher-servlet.xml
August 11, 2015 8:22:17 pm org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping Registerhandlermethod Information:Mapped "{[//hello],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public Java.lang.String com.springapp.mvc.HelloController.printWelcome (ORG.SPRINGFRAMEWORK.UI.MODELMAP)August 11, 2015 8:22:18 pm org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter Initcontrolleradvicecache info: Looking for @ControllerAdvice: Webapplicationcontext for namespace ' Mvc-dispatcher-servlet ': startup date [Tue 20:22:17 CST 2015]; Parent:root Webapplicationcontext August 11, 2015 8:22:18 PM Org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter Initcontrolleradvicecache Information: Looking for @ControllerAdvice: Webapplicationcontext for namespace ' Mvc-dispatcher-servlet ': startup date [Tue 11 20:2 2:17 CST 2015]; Parent:root Webapplicationcontext August 11, 2015 8:22:18 PM Org.springframework.web.servlet.handler.SimpleUrlHandlerMapping Registerhandler Info: Mapped URL path [/**] onto handler ' Org.springframework.web.servlet.resource.resourcehttprequesthandler#0 ' August 11, 2015 8:22:18 PM Org.springframework.web.servlet.DispatcherServlet Initservletbean Info: Frameworkservlet ' mvc-dispatcher ': Initialization completed in 1131 MS

About

The part of the mvc-dispatcher-servlet.xml name is configured in Web. xml
<servlet>
<servlet-name>mvc-dispatcher</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>mvc-dispatcher</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>

"Mapping" SPRINGMVC annotations mapping issues that are not valid

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.