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>
    
  • 相关阅读:
    9本Java程序员必读的书
    最短路径问题:dijkstar
    RSA加密算法
    BFC 浅谈
    纯css3配合vue实现微信语音播放效果
    Vue内置组件keep-alive的使用
    vim常用命令
    Java实体映射工具MapStruct的使用
    hexo文章编写部分语法总结以及hexo使用
    高级进程间通信
  • 原文地址:https://www.cnblogs.com/cmxblog/p/11891927.html
Copyright © 2011-2022 走看看