(i) One by one mapping by name (default)
(ii) Specify the mapping by a simple URL, key means the access URL value is the Bean's ID
(iii) by controlling the class name controller of the class, the first letter of the class name needs to be lowercase when accessing
<!--Configuring Controller--
<bean id= "Logincontroller" name= "/login.do" class= "Com.beifeng.controller.LoginController" ></bean>
<!--configuration Map Processor: Name to map the Find controller (default)--
<bean class= "Org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping" ></bean>
<!--Configuring the mapping Processor: Find a controller with a simple URL--
<bean class= "Org.springframework.web.servlet.handler.SimpleUrlHandlerMapping" >
<property name= "Mappings" >
<props>
<prop key= "Login1.do" >loginController</prop>
</props>
</property>
</bean>
<!--configuration Mapping Processor: Class name controller for the control class, and the first letter of class name needs to be accessed in lowercase--
<bean class= "Org.springframework.web.servlet.mvc.support.ControllerClassNameHandlerMapping" ></bean>
<form action="login.do">
Account: <input type="text" name="UserName"/><br/>
Password: <input type="password" name="USERPW"/><br/>
<input type="Submit" value=" login "/>
</form>
(ii) Replace the URL of action with login1.do when visiting
(iii) Replace the URL of action with logincontroller.do when visiting
Spring MVC three ways to configure XML Access controller