springmvc两种非注解的处理器映射器
2024-09-01 07:48:07
<?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>
两种处理器映射器都可以共存不相互影响。
最新文章
- 给Java程序猿们推荐一些值得一看的好书
- CLR执行模型
- Repeater控件的分页效果
- <;Liunx常用命令一>;之TOP
- 用ISO C++实现自己的信号槽(Qt另类学习)
- app:layout_scrollFlags不起作用
- 【HDOJ】1421 搬寝室
- code-Behind 技术
- TeamViewer试用期满转免费版本方法
- HDU 1556-Color the ball-树状数组
- A1064. Complete Binary Search Tree
- java的类和对象
- js 冒泡事件 点击任意地方隐藏元素
- BCHABC/BCHSV的矛盾所在
- bzoj千题计划204:bzoj2813: 奇妙的Fibonacci
- 1. Apache Axis2 下载安装入门
- 多线程-Thread的run()与start()的区别
- 金蝶K3,名称或代码在系统中已被使用,由于数据移动,未能继续以NOLOCK方式扫描
- GoogleCpp风格指南 8)格式 _part1
- Hive 安装
热门文章
- 通过Powershell修改文件默认打开方式
- java多线程中wait/notify/sleep/join/yield方法以及多线程的六种状态
- Springmvc的运行原理 SpringMvc的优点
- Opengl_入门学习分享和记录_02_渲染管线(一)顶点着色器&;片段着色器
- 单机版ZooKeeper的安装教程
- java web 加载Spring --web.xml 篇
- T-SQL基础语句
- Go语言-基本的http请求操作
- 史上最全面的SignalR系列教程-5、SignalR 实现一对一聊天
- 线上调试工具 jvm-sandbox使用