zoukankan      html  css  js  c++  java
  • ssm整合之springmvc.xml文件

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:context="http://www.springframework.org/schema/context"
    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.xsd
    http://www.springframework.org/schema/mvc
    http://www.springframework.org/schema/mvc/spring-mvc.xsd
    http://www.springframework.org/schema/context
    http://www.springframework.org/schema/context/spring-context.xsd">

    <!--开启注解扫描,只扫描Controller注解-->
    <context:component-scan base-package="com.ityw">
    <context:include-filter type="annotation" expression="org.springframework.stereotype.Controller" />
    </context:component-scan>

    <!--配置的视图解析器对象-->
    <bean id="internalResourceViewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
    <property name="prefix" value="/WEB-INF/pages/"/>
    <property name="suffix" value=".jsp"/>
    </bean>
    <!--过滤静态资源-->
    <mvc:resources location="/css/" mapping="/css/**" />
    <mvc:resources location="/images/" mapping="/images/**" />
    <mvc:resources location="/js/" mapping="/js/**" />
    <!-- 2.静态资源默认servlet配置-->
    <mvc:default-servlet-handler/>

    <!--开启SpringMVC注解的支持-->
    <mvc:annotation-driven/>
    <!--关于拦截器的配置-->
    <mvc:interceptors>
    <mvc:interceptor>
    <mvc:mapping path="/**"/>
    <bean id="loginInterceptor" class="com.ityw.interceptor.LoginInterceptor"/>
    </mvc:interceptor>
    </mvc:interceptors>
    </beans>

  • 相关阅读:
    无限循环小数化分数、
    HDU 1060
    HDU 2601
    HDU 1286
    HDU 1071
    有关SQLite的substr函数的笔记
    Android 在安装完成界面,点击打开应用程序。在应用程序点击home键,再从桌面打开程序导致产生多个实例或者说程序被重复打开
    酷派8150S(移动定制版)可用的第三方Recovery备份数据、刷机并精简系统内置APK经验
    个人经验
    批处理脚本
  • 原文地址:https://www.cnblogs.com/ITYW/p/13304792.html
Copyright © 2011-2022 走看看