<?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:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.2.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.2.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.2.xsd"> <!-- 配置处理器映射器 -->
<bean class="org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping"></bean> <!-- 配置处理器适配器 -->
<!-- 以bean的name属性值作为url -->
<bean class="org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter"></bean> <!-- 以bean的id属性值作为url -->
<bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="mappings">
<props>
<prop key="/user1.action">user</prop>
<prop key="/user2.action">user</prop>
</props>
</property>
</bean>
<!-- 配置视图解析器 -->
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"></bean> <!-- controller -->
<bean id="user" name="/user.action" class="com.zhou.controller.UserController"></bean>
</beans>

两种处理器映射器都可以共存不相互影响。

最新文章

  1. 给Java程序猿们推荐一些值得一看的好书
  2. CLR执行模型
  3. Repeater控件的分页效果
  4. &lt;Liunx常用命令一&gt;之TOP
  5. 用ISO C++实现自己的信号槽(Qt另类学习)
  6. app:layout_scrollFlags不起作用
  7. 【HDOJ】1421 搬寝室
  8. code-Behind 技术
  9. TeamViewer试用期满转免费版本方法
  10. HDU 1556-Color the ball-树状数组
  11. A1064. Complete Binary Search Tree
  12. java的类和对象
  13. js 冒泡事件 点击任意地方隐藏元素
  14. BCHABC/BCHSV的矛盾所在
  15. bzoj千题计划204:bzoj2813: 奇妙的Fibonacci
  16. 1. Apache Axis2 下载安装入门
  17. 多线程-Thread的run()与start()的区别
  18. 金蝶K3,名称或代码在系统中已被使用,由于数据移动,未能继续以NOLOCK方式扫描
  19. GoogleCpp风格指南 8)格式 _part1
  20. Hive 安装

热门文章

  1. 通过Powershell修改文件默认打开方式
  2. java多线程中wait/notify/sleep/join/yield方法以及多线程的六种状态
  3. Springmvc的运行原理 SpringMvc的优点
  4. Opengl_入门学习分享和记录_02_渲染管线(一)顶点着色器&amp;片段着色器
  5. 单机版ZooKeeper的安装教程
  6. java web 加载Spring --web.xml 篇
  7. T-SQL基础语句
  8. Go语言-基本的http请求操作
  9. 史上最全面的SignalR系列教程-5、SignalR 实现一对一聊天
  10. 线上调试工具 jvm-sandbox使用