<?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>

ssm整合之springmvc.xml文件的更多相关文章

  1. ssm整合之web.xml文件

    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" " ...

  2. ssm整合的springmvc.xml的配置

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

  3. ssm整合的spring.xml文件配置(applicationContext.xml)

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

  4. 【报错】spring整合activeMQ,pom.xml文件缺架包,启动报错:Caused by: java.lang.ClassNotFoundException: org.apache.xbean.spring.context.v2.XBeanNamespaceHandler

    spring版本:4.3.13 ActiveMq版本:5.15 ======================================================== spring整合act ...

  5. 配置ssm 时, web.xml 文件无 # 自动代码提示

    环境:STS 版本:spring-tool-suite-3.8.1.RELEASE-e4.6-win32-x86_64 配置ssm 时, web.xml 文件无 如下图蓝色圈范围内的提示 问题与 链接 ...

  6. ssm整合(基于xml配置方式)

    本文是基于xml配置的方式来整合SpringMVC.Spring和Mybatis(基于注解的方式会再写一篇文章),步骤如下: (1)首先自然是依赖包的配置文件 pom.xml <project ...

  7. Spring整合Hibernate的XML文件配置,以及web.xml文件配置

    利用Spring整合Hibernate时的XML文件配置 applicationContext.xml <?xml version="1.0" encoding=" ...

  8. SSM 生成mapper中xml文件:未能解析映射资源:“文件嵌套异常

    错误日记我就网上随便找个贴着: 错误一: org.springframework.beans.factory.BeanCreationException: Error creating bean wi ...

  9. spring-mvc xml文件的最基本配置

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

随机推荐

  1. 【开发总结】order by 为什么没有走索引?

    1.  现象 表结构如下 CREATE TABLE `ACT_HI_INST` ( `ID` varchar(64) COLLATE utf8_bin NOT NULL COMMENT '主键', ` ...

  2. 8.ExecutorService-执行器服务

  3. 常见消息中间件之RocketMQ

    前言 RocketMQ是一款分布式.队列模型的消息中间件,由阿里巴巴自主研发的一款适用于高并发.高可靠性.海量数据场景的消息中间件.早期开源2.X版本名为MetaQ:2015年迭代3.X版本,更名为R ...

  4. Swiper 在IE9 及其他浏览器使用

    Swiper 在IE9 及其他浏览器使用 前言 昨天遇到一个问题,swiper 使用版本是3.4.2 除了Ie9浏览器外其他浏览器都正常,IE9 无法轮播,执行控制台报错源码问题.没办法,只能降级兼容 ...

  5. 使用implicitly demo

    泛型:  Context Bounds // //定义一个隐式值, 这个值不能少, 要不找不到比较的对象 implicit val personCompartor = new Ordering[Per ...

  6. 记一次uwsgi django nginx 调优

    [uwsgi] project = fortune_cat uid = ubuntu gid = ubuntu path = fortune_cat base = /home/%(uid) chdir ...

  7. 这么美的“vector容器”,你确定你不看吗?

    内容思维导图: 一.vector基本概念: 1.功能: vector数据结构和数组非常相似,也称为单端数组. 2.vector和普通数组的区别: 不同之处在于数组是静态空间,而vector是可以动态扩 ...

  8. 086 01 Android 零基础入门 02 Java面向对象 01 Java面向对象基础 03 面向对象基础总结 01 面向对象基础(类和对象)总结

    086 01 Android 零基础入门 02 Java面向对象 01 Java面向对象基础 03 面向对象基础总结 01 面向对象基础(类和对象)总结 本文知识点:面向对象基础(类和对象)总结 说明 ...

  9. MCU(Micro Control Unit)中文名称为微控制单元

    参考:http://www.elecfans.com/dianzichangshi/mcu.html 什么是mcu_mcu是什么意思 标签:MCU(471)单片机(3098)微控制器(503) MCU ...

  10. 6个LED的控制

    控制任务和要求 让6个LED按要求工作 电路设计 程序设计 1 int Led1 = 1; //各LED与实验板的联接引脚 2 int Led2 = 2; 3 int Led3 = 3; 4 int ...