<?xml version= "1.0" encoding= "UTF-8"? ><beans xmlns= "Http://www.springframework.org/schema/beans" xmlns: Xsi= "Http://www.w3.org/2001/XMLSchema-instance" xmlns:aop= "HTTP://WWW.SPRINGFRAMEWORK.ORG/SCHEMA/AOP" xmlns:c= " Http://www.springframework.org/schema/c "xmlns:mvc=" Http://www.springframework.org/schema/mvc "xmlns:p="/HTTP/ www.springframework.org/schema/p "xmlns:tx=" Http://www.springframework.org/schema/tx "xmlns:util="/HTTP/ Www.springframework.org/schema/util "xmlns:context=" Http://www.springframework.org/schema/context "xsi: schemalocation= "Http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/ Spring-aop.xsdhttp://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/ Spring-mvc.xsdhttp://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/ Spring-beans.xsdhttp://www.springframework.org/schema/util http://www.springframework.org/schema/util/ Spring-util.xsdhttp://www.springframework.org/schema/contextHttp://www.springframework.org/schema/context/spring-context.xsdhttp://www.springframework.org/schema/tx http:/ /www.springframework.org/schema/tx/spring-tx.xsd "><!--scan all annotation classes <context:component-scan base-package=" Controller "></context:component-scan>--><!--configuration handlermapping--><bean class=" Org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping "></bean><!--configuration Handleradapter-- ><bean class= "Org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter" ></bean><!-- Configure renderer P:prefix: Set the prefix of the path p:suffix: Set the suffix of the path--><bean class= " Org.springframework.web.servlet.view.InternalResourceViewResolver "p:prefix="/"p:suffix=". JSP ></bean> <!--configuring controller--><bean name= "/test.do" class= "Controller.controller" ></bean></beans>
Spring MVC Header and configuration handlermapping handleradapter Controller