- <?xml version="1.0" encoding="UTF-8"?>
- <beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:aop="http://www.springframework.org/schema/aop"
- xmlns:tx="http://www.springframework.org/schema/tx"
- xmlns:context="http://www.springframework.org/schema/context"
- xmlns:p="http://www.springframework.org/schema/p"
- xmlns:mvc="http://www.springframework.org/schema/mvc"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/aop
- http://www.springframework.org/schema/aop/spring-aop.xsd
- http://www.springframework.org/schema/tx
- http://www.springframework.org/schema/tx/spring-tx.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
- ">
-
- <!--<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
- <property name="suffix" value=".jsp"></property>
- </bean>-->
-
-
- <bean class="org.springframework.web.servlet.view.BeanNameViewResolver"/>
-
-
- <bean id="innter" class="org.springframework.web.servlet.view.JstlView">
- <property name="url" value="/index2.jsp"></property>
- </bean>
-
-
- <bean id="jd" class="org.springframework.web.servlet.view.RedirectView">
- <property name="url" value="https://www.jd.com/"></property>
- </bean>
-
-
- <bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
- <property name="urlMap">
- <map>
- <entry key="/hello.do" value="multfist"></entry>
- </map>
- </property>
- </bean>
-
-
- <bean id="propertName" class="org.springframework.web.servlet.mvc.multiaction.PropertiesMethodNameResolver">
- <property name="mappings">
- <props>
- <prop key="/fist.do">insert</prop>
- <prop key="/secord.do">delete</prop>
- </props>
- </property>
- </bean>
-
-
- <bean id="parameterMethodNameResolver" class="org.springframework.web.servlet.mvc.multiaction.ParameterMethodNameResolver">
-
- </bean>
-
-
- <bean id="multfist" class="cn.hello.Conteller.MyView">
- <property name="methodNameResolver" ref="parameterMethodNameResolver"> </property>
- </bean>
-
-
- </beans>
public class MyView extends MultiActionController {
public ModelAndView insert(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
ModelAndView mv=new ModelAndView();
mv.setViewName("jd");
return mv;
}
}