------------I do not have him, but the hand is ripe, humble and foolish, and eager to be hungry-------------
Beannameurlhandlermapping and Simpleurlhandlermapping
Beannameurlhandlermapping belongs to the SPRINGMVC default processor mapper, which is not worthy of this
Because it has been configured in the SPRINGMVC configuration file
You can also configure the beannameurlhandlermapping, but it is useless in your own XML configuration file:
<!--processor Mapper, write not write all line, this default value is this--and class=" Org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping"></bean>
Simpleurlhandlermapping Processor Mapper Configuration:
In your own XML configuration file:
<?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:mvc="Http://www.springframework.org/schema/mvc"xsi:schemalocation="Http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd HTTP://WWW.SPRINGFRAMEWORK.ORG/SCHEMA/MVC http://www.springframework.org/schema/mvc/spring-mvc.xsd"> <!--Configuring Bean processors--<bean id="Second" class="Cn.dawn.day03simpleUrlHandlerMapping.FirstController"></bean> <!--View Resolver-<beanclass="Org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="prefix"Value="/"></property> <property name="suffix"Value=". JSP"></property> </bean> <!--processor Mapper-<beanclass="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> <!--the first way--<!--<property Name="UrlMap"> <map> <entry key="/hello"> <value>second</value> </entry> </map> < ;/property>--> <!--second Way--<property name="Mappings"> <props> <!--value is the id--> <prop of the above mapper key="/hello">second</prop> </props> </property> </bean></beans>
Then I can access the second processor through/hello.
Processor Mapper in SSM-SPRINGMVC-07:SPRINGMVC