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:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	xmlns:context="http://www.springframework.org/schema/context"
    	xmlns:mvc="http://www.springframework.org/schema/mvc"
    	xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd
    		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-4.0.xsd">
    
    <!-- 配置扫描包  -->
        <context:component-scan base-package="com.offcn" use-default-filters="false">
         <context:include-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
         <context:include-filter type="annotation" expression="org.springframework.web.bind.annotation.ControllerAdvice"/>
        </context:component-scan>
        
        <!-- 配置内部资源视图解析器  -->
        <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
           <property name="prefix" value="/WEB-INF/"></property>
           <property name="suffix" value=".jsp"></property>
        </bean>
        
        
        <!-- 配置处理静态资源文件的标签 -->
        <mvc:default-servlet-handler/>
        <mvc:annotation-driven/>
    </beans>
    
  • 相关阅读:
    Python中下划线---完全解读(转)
    数字、基数及表示
    实现二叉排序树的各种算法
    shell脚本 空格
    Linux中执行shell脚本的4种方法
    vim常用命令总结
    Linux 奇技淫巧
    排序算法之二分治法
    二分查找
    排序算法之一插入排序
  • 原文地址:https://www.cnblogs.com/cmxblog/p/11891927.html
Copyright © 2011-2022 走看看