zoukankan      html  css  js  c++  java
  • spring-servlet.xml

    <?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-3.1.xsd
    http://www.springframework.org/schema/context
    http://www.springframework.org/schema/context/spring-context-3.1.xsd
    http://www.springframework.org/schema/mvc
    http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd">

    <!-- 扫描注解类 -->
    <context:component-scan base-package="cn.bdqn.oa.controller"></context:component-scan>

    <!-- 添加mvc的注解支持 -->
    <mvc:annotation-driven/>

    <!-- 配置spring mvc静态资源 -->
    <!--mapping 映射的资源路径,也就是页面中请求的路径 -->
    <!-- location 实际的资源路径 -->
    <mvc:resources location="/js/" mapping="/js/*"/>
    <mvc:resources location="/welcome.html" mapping="/welcome.html"/>
    <!--mapping="/css2/**" 两个*可以匹配子目录,对应的css下面也要有同名子目录 -->
    <mvc:resources location="/css/" mapping="/css2/**"/>
    <mvc:resources location="/images/" mapping="/images/**"/>

    <!-- 视图解析器 -->
    <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
    <property name="prefix" value="/WEB-INF/page"></property>
    <property name="suffix" value=".jsp"></property>
    </bean>


    </beans>

  • 相关阅读:
    【东师软工】第二次成绩排行榜
    博客(懒得在cnblog移了)
    elementUI el-tree 修改无子项的样式
    流文件下载方法
    2.2.3 核心模块--理解.NetCore Configuration 配置管理
    Centos7下安装部署Asp.Net Core多版本依赖环境
    LADP认证接入
    Identity Server基础
    浅析DevOps中结合IAST的落地介绍
    从Leetcode的回文子串中学习动态规划和中心扩散法
  • 原文地址:https://www.cnblogs.com/luchangguang/p/6684785.html
Copyright © 2011-2022 走看看