Spring MVC web.xml+servlet.xml
2024-08-28 23:05:06
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" > <web-app>
<display-name>Archetype Created Web Application</display-name>
<servlet>
<servlet-name>spring</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet> <servlet-mapping>
<servlet-name>spring</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping> </web-app>
<?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"
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.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd"> <!-- 启用spring mvc 注解 -->
<context:annotation-config /> <!-- 设置使用注解的类所在的jar包 -->
<context:component-scan base-package="com.idefav.springdemo.controller"></context:component-scan> <!-- 完成请求和注解POJO的映射 -->
<bean
class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter" /> <!-- 对转向页面的路径解析。prefix:前缀, suffix:后缀 -->
<bean id="viewResolver"
class="org.springframework.web.servlet.view.InternalResourceViewResolver"
p:prefix="/WEB-INF/jsp/"
p:suffix=".jsp" />
</beans>
最新文章
- MYSQL 5.0 USING BTREE 错误
- ACM Steps 2.1.8
- WinForm程序打包说明
- js 日期时间控制器
- 3527: [Zjoi2014]力 - BZOJ
- Sqlserver 关于游标
- Codeforces Round #315 (Div. 2)
- NSDateFormatter 格式说明
- python:字符串取值
- Online Judge(OJ)搭建——3、MVC架构
- vue-router 通过路由来实现切换头部标题
- [转]CSS clear both清除浮动
- 向后台提交数据:利用cookie加session提交更多数据,
- HDU 6119 小小粉丝度度熊 (区间去重)【尺取】
- xhr是什么文件类型?
- 首先看一下友晶DE-SOC开发板的user manual
- JS获取填报扩展单元格控件的值
- Hadoop生态圈-Azkaban实现hive脚本执行
- Route学习笔记之Area的Route注册
- 老三星手机i9001刷机记录
热门文章
- .net core 启动域名及端口配置
- activate mod_rewrite How To Set Up mod_rewrite for Apache on Ubuntu 14.04 Apache Rewrite url重定向功能的简单配置
- C++应该被看成是个语言集合——四种语言(C语言,OO语言,泛型语言,STL)
- 【keras框架】
- SQL Server 排名函数
- APICloud常用方式
- Numpy包简单介绍
- 美化MFC 之调整静态文本的颜色 字体。 用于添加公司标题 联系方式 口号等数据
- android 带RadioButton的Dialog
- SQL Server创建事务——锁