<?XML version= "1.0" encoding= "UTF-8"?><Beansxmlns= "Http://www.springframework.org/schema/beans"Xmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance"Xmlns:context= "Http://www.springframework.org/schema/context"Xmlns:mvc= "Http://www.springframework.org/schema/mvc"XMLNS:AOP= "HTTP://WWW.SPRINGFRAMEWORK.ORG/SCHEMA/AOP"xsi:schemalocation= "Http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd Http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd HTTP://WWW.SPRINGFRAMEWORK.ORG/SCHEMA/MVC http://www.springframework.org/schema/mvc/spring-mvc.xsd htt P://WWW.SPRINGFRAMEWORK.ORG/SCHEMA/AOP http://www.springframework.org/schema/aop/spring-aop.xsd "> <!--Annotations <context:component-scan> - <!--start scanner scan base-package= "" The bean in this package can be omitted <bean id= "" class= ""/> This syntax while the bean needs annotation annotation type has controller , service, Repository, component - <Context:component-scanBase-package= "com"/><!--Handlermapping is the processor map, which maps Web requests to the correct processor -<BeanID= "Haldermapping"class="" > < Propertyname= "Mappings"> <Props> <propname= "/login.do">Login</prop> <Props></ Property></Bean><!--value that corresponds to the login.do above -<BeanID= "Login"class=""><!--MVC Scan, with it can not write the above processor mapping the controller component of the method above to add annotation @requestmapping ("/login.do") process login.do Request Path Method @requestparam ( "username") specifies the incoming web inside name= "username" parameter - <Mvc:annotation-driven></Mvc:annotation-driven><!--Viewresolver is the view layer, which can be added with some conditions -<BeanID= "Viewresolver"class= "Org.springframework.web.servlet.view.InternalResourceViewResolver"></Bean></Beans>
Configuration file description for SPRINGMVC