SSM整合之springmvc-servlet.xml

最近在使用SSM整合一个通用的后台管理系统,记录一下自己的整合过程,方便以后查阅,今天我们来说一下springmvc-servlet.xml,该配置文件通常放置在WebRoot/WEB-INF文件夹下面,该配置文件会随着自己的整合不断修改。配置文件如下:


<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:aop="http://www.springframework.org/schema/aop"
       xmlns:tx="http://www.springframework.org/schema/tx"
       xmlns:mvc="http://www.springframework.org/schema/mvc"
       xmlns:context="http://www.springframework.org/schema/context"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
        http://www.springframework.org/schema/aop
         http://www.springframework.org/schema/aop/spring-aop.xsd
         http://www.springframework.org/schema/context 
         http://www.springframework.org/schema/context/spring-context.xsd
         http://www.springframework.org/schema/tx
         http://www.springframework.org/schema/context/spring-tx.xsd
         http://www.springframework.org/schema/mvc
         http://www.springframework.org/schema/mvc/spring-mvc.xsd
        ">

  
<context:component-scan base-package="com.cesoft.controller" >context:component-scan> 


 
 <mvc:default-servlet-handler />
 
 <mvc:annotation-driven />
  

    <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">  
          
         
        
    bean>  
    
    <mvc:resources location="/WEB-INF/static/css/" mapping="/css/**">mvc:resources>
    <mvc:resources location="/WEB-INF/static/js/" mapping="/js/**">mvc:resources>
    <mvc:resources location="/WEB-INF/static/images/" mapping="/images/**"/>
    <mvc:resources location="/WEB-INF/static/lib/" mapping="/lib/**"/>
beans>

你可能感兴趣的:(SSM)