spring mvc 配置文件信息记录
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
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-3.0.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-3.0.xsd">
<!-- 自动扫描包名,扫描指定的包中的类上的注解 -->
<context:component-scan base-package="cn.ct.em.*.controller, cn.ct.em.v3.*.controller" use-default-filters="false">
<context:include-filter type="annotation" expression="org.springframework.stereotype.Controller" />
<!-- </context:component-scan>不仅可以完成 <context:annotation-config>一样的工作。
(<context:annotation-config>有助于完善Spring配置中的<Property>和<constructor-arg>元素,但是<bean>仍需显示定义 )
</context:component-scan>而且会自动扫描指定的包(cn.ct.em.*.controller, cn.ct.em.v3.*.controller)并查找出能够自动注册为Spring Bean的类
-->
</context:component-scan>
<!-- sping mvc 为@Controllers分发请求所必须的,并提供了数据绑定支持,读写XML支持,读写JSON的支持
可以替换成<mvc:annotation-driven />自动的会自动注册DefaultAnnotationHandlerMapping与AnnotationMethodHandlerAdapter 两个bean
并提供了:数据绑定支持,@NumberFormatannotation支持,@DateTimeFormat支持,@Valid支持,读写XML的支持(JAXB),读写JSON的支持(Jackson)
-->
<bean class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter" />
<bean class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping" />
<!-- 对静态资源文件的访问使用默认的servlet来响应
Tomcat, Jetty, JBoss, and GlassFish 自带的默认Servlet的名字 -- "default"
Google App Engine 自带的 默认Servlet的名字 -- "_ah_default"
Resin 自带的 默认Servlet的名字 -- "resin-file"
WebLogic 自带的 默认Servlet的名字 -- "FileServlet"
WebSphere 自带的 默认Servlet的名字 -- "SimpleFileServlet"
-->
<mvc:default-servlet-handler />
<!-- 视图解释类 -->
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/page/"></property>
<property name="suffix" value=".jsp"></property>
</bean>
</beans>
spring mvc 配置文件信息记录的更多相关文章
- Spring MVC 配置文件dispatcher-servlet.xml 文件详解
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.sp ...
- Spring MVC 配置文件dispatcher-servlet.xml 文件详解(转自 学无止境-yj)
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.sp ...
- Spring MVC配置文件的三个常用配置详解
转自:http://www.cnblogs.com/benwu/articles/5162614.html Spring MVC项目中通常会有二个配置文件,sprng-servlet.xml和appl ...
- spring mvc 配置文件拦截器过滤url
最近在用spring mvc拦截器,sprin 版本号4.0.6.RELEASE, <mvc:interceptor> <mvc:mapping path="/admin/ ...
- spring配置文件和spring mvc配置文件的区别
Question: Are applicationContext.xml and spring-servlet.xml related anyhow in Spring Framework? Will ...
- spring mvc开发过程知识点记录
给一个客户做的一个小项目,需求就是输入类似一个短网址http://dd.yy/xxxx然后跳转到另外一个域名下的图书文件.(实际很多短网址站都提供API供调用吧,不过客户需求是他自己建立一个短网址服务 ...
- mybatis整合spring获取配置文件信息出错
描述:mybatis整合spring加载jdbc.properties文件,然后使用里面配置的值来 配置数据源,后来发现用户变成了admin- jdbc.properties的配置: 加载配置: 报错 ...
- Spring MVC 配置文件
<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.spr ...
- Spring MVC配置文件
都说开发Spring Web程序的配置文件很繁琐,所以就写了一篇配置博客, 首先是pom.xml文件 <project xmlns="http://maven.apache.org/P ...
随机推荐
- SQL:查找被锁的表,以及锁表的SQL语句(重点推荐)
--死锁检测 use master Select * --找到SPID exec sp_lock --根据SPID找到OBJID ) --根据OBJID找到表名 1.DatabaseName 同于你要 ...
- SVM之SMO最小序列
转载自:JerryLead http://www.cnblogs.com/jerrylead/archive/2011/03/18/1988419.html 11 SMO优化算法(Sequential ...
- zookeeper安装及部署
安装及部署 一. 单机安装.配置 1.下载zookeeper二进制安装包 下载 curl -L -O http://apache.fayea.com/zookeeper/stable/zookeepe ...
- ORA-12154: TNS:could not resolve the connect identifier specified
场景: .Net程序无法连接到数据库 现象: 2015/8/26 11:02:03 ORA-12154: TNS:could not resolve the connect identifier sp ...
- 在Linux中永久设置Anaconda环境变量的方法
[感谢:http://www.codesec.net/view/459539.html] 如果在安装Anaconda的过程中没有将安装路径添加到系统环境变量中,需要在安装后手工添加: 1.在终端输入$ ...
- 6.3Sum && 4Sum [ && K sum ] && 3Sum Closest
3Sum Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find a ...
- 剑指Offer:面试题20——顺时针打印矩阵(java实现)
题目描述: 输入一个矩阵,按照从外向里以顺时针的顺序依次打印出每一个数 字,例如,如果输入如下矩阵: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 则依次打印出数字1, ...
- sql 分组查询及格不及格人数
select score as 类别,count(*) as 人数 from (select case when fen>=60 then '及格' else '不及格' end as scor ...
- lintcode-【简单题】快乐数
题目: 写一个算法来判断一个数是不是"快乐数". 一个数是不是快乐是这么定义的:对于一个正整数,每一次将该数替换为他每个位置上的数字的平方和,然后重复这个过程直到这个数变为1,或是 ...
- angular 的ng-view,ngrouter
通过ng-view和ngRouter控制页面显示内容: html: <body ng-app="AngularStore"> <div class="c ...