<?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:mvc="http://www.springframework.org/schema/mvc"
        xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/context
        http://www.springframework.org/schema/context/spring-context.xsd
        http://www.springframework.org/schema/tool
        http://www.springframework.org/schema/tool/spring-tool.xsd
         http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
"

>

    <!--  让程序自动扫描  cn.tq.gov 包下所有controller -->
       <context:component-scan base-package="cn.tq.gov">

        </context:component-scan>

    <!-- 配置访问静态资源-->
    <mvc:annotation-driven/>

    <!-- 引入视图解析器    程序自动到 WEB_INF/Views/找视图文件   -->
    <bean name="viewResolver"   class="org.springframework.web.servlet.view.InternalResourceViewResolver">
        <property name="prefix" value="/WEB-INF/Views/">   </property>
        <property name="suffix" value=".jsp">   </property>
    </bean>
      <!--   视图控制器  即 不通过Controller 中的action 直接完成跳转
      path 指路径 ,view-name视图名称
      指定默认首页  用户访问根目录 直接呈现 index.jsp 页面   viewResolver 中的前缀 后缀依然好使    -->
      <mvc:view-controller path="/" view-name="index"/>

    <!--
     注释快捷键:CTRL + SHIFT + /

      取消注释快捷键:CTRL + SHIFT + \

    将web 下 images 文件夹及子文件夹 用"**"表示  对外映射
      可以在  WEB-INF 下建立 resource 目录 将 js,css,image等文件统一对外映射
    -->
    <mvc:resources mapping="/images/**" location="/images/"/>




</beans>