<?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 配置文件信息记录的更多相关文章

  1. Spring MVC 配置文件dispatcher-servlet.xml 文件详解

    <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.sp ...

  2. Spring MVC 配置文件dispatcher-servlet.xml 文件详解(转自 学无止境-yj)

    <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.sp ...

  3. Spring MVC配置文件的三个常用配置详解

    转自:http://www.cnblogs.com/benwu/articles/5162614.html Spring MVC项目中通常会有二个配置文件,sprng-servlet.xml和appl ...

  4. spring mvc 配置文件拦截器过滤url

    最近在用spring mvc拦截器,sprin 版本号4.0.6.RELEASE, <mvc:interceptor> <mvc:mapping path="/admin/ ...

  5. spring配置文件和spring mvc配置文件的区别

    Question: Are applicationContext.xml and spring-servlet.xml related anyhow in Spring Framework? Will ...

  6. spring mvc开发过程知识点记录

    给一个客户做的一个小项目,需求就是输入类似一个短网址http://dd.yy/xxxx然后跳转到另外一个域名下的图书文件.(实际很多短网址站都提供API供调用吧,不过客户需求是他自己建立一个短网址服务 ...

  7. mybatis整合spring获取配置文件信息出错

    描述:mybatis整合spring加载jdbc.properties文件,然后使用里面配置的值来 配置数据源,后来发现用户变成了admin- jdbc.properties的配置: 加载配置: 报错 ...

  8. Spring MVC 配置文件

    <?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.spr ...

  9. Spring MVC配置文件

    都说开发Spring Web程序的配置文件很繁琐,所以就写了一篇配置博客, 首先是pom.xml文件 <project xmlns="http://maven.apache.org/P ...

随机推荐

  1. IOS开发-代码规范

    代码风格的重要性对于一个团队和项目来说不言而喻.网上有许多 Objective-C 的代码风格,但这份简洁而又最符合苹果的规范,同时有助于养成良好的代码习惯,也是我们团队一直遵循的代码风格. 写法没有 ...

  2. 11 TCP/IP 基础与Linux的网络配置

    1. TCP/IP与OSI参考模型 TCP/IP是Unix/Linux世界的网络基础,在某种意义上Unix网络就是TCP/IP,而TCP/IP就是网络互联的标准.它不是一个独立的协议,而是一组协议.其 ...

  3. js反射机制

    本文转载自:http://blog.csdn.net/liuzizi888/article/details/6632434 什么是反射机制反射机制指的是程序在运行时能够获取自身的信息.例如一个对象能够 ...

  4. change-resource-tags.sh

    #!/bin/bash ids=$(aws ec2 describe-instances --filter "Name=tag:Project,Values=ERPSystem" ...

  5. 【uTenux实验】写在开始实验之前

    1.使用的uTenux内核代码:http://www.uloong.cc/cn/download/uTenux_V1.6.00r180.zip 2.uTenux的特性: 1.微内核  2.开放源码.完 ...

  6. angular.js ng-class-even ng-class-odd ng-cloak(没啥技术含量)

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...

  7. bootstrap-巨幕、缩略图、警告框

    巨幕: <div class="jumbotron"> <div class="container"> <h1>W3Scho ...

  8. 创建eclipse针对NDK的联合编译环境。

    警告, 这篇文章是老的配置方式, 随着goolge工具的完善,有了更高级的配置方式,参考文章: 1.http://jingyan.baidu.com/article/3ea51489e7a9bd52e ...

  9. 实习日记:图像检索算法 LSH 的总结与分析

    先贴上这两天刚出炉的C++代码.(利用 STL 偷了不少功夫,代码待优化) Head.h #ifndef HEAD_H #define HEAD_H #include "D:\\LiYang ...

  10. 删除空文件夹 清除CS扩展名文件 bat

    删除空文件夹.删的干净.删的彻底. 将下列代码复制到txt中保存.并把后缀.txt命成.bat.然后运行即可. 方案1.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ...