首页 > 其他分享 >SSM框架各配置文件模板

SSM框架各配置文件模板

时间:2022-10-13 15:01:16浏览次数:47  
标签:xml 配置文件 框架 SpringMVC SSM 模板

SpringMVC配置文件

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

    <!--    静态资源过滤-->
    <mvc:default-servlet-handler/>

    <mvc:annotation-driven/>

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

    <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
        <property name="prefix" value="/WEB-INF/jsp/"/>
        <property name="suffix" value=".jsp"/>
    </bean>


    <mvc:interceptors>
        <mvc:interceptor>
            <mvc:mapping path="/**"/>
            <bean class="com.xing.config.LoginInterceptor"/>
        </mvc:interceptor>
    </mvc:interceptors>

</beans>

标签:xml,配置文件,框架,SpringMVC,SSM,模板
From: https://www.cnblogs.com/luluxing/p/16767166.html

相关文章