| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?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: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.xsd
- http://www.springframework.org/schema/mvc
- http://www.springframework.org/schema/mvc/spring-mvc.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
- <!-- 根目录'/'对应页面 -->
- <mvc:view-controller path="/" view-name="/index.jsp"/>
- <!-- 拦截器配置 -->
- <mvc:interceptors>
- <!-- 后台拦截器 -->
- <mvc:interceptor>
- <!-- 拦截路径 -->
- <mvc:mapping path="/manage/**"/>
- <!-- 非拦截路径 -->
- <mvc:exclude-mapping path="/manage/login"/>
- <!-- 拦截器对象 -->
- <bean id="manageInterceptor" class="com.zheng.cms.admin.Interceptor.ManageInterceptor"/>
- </mvc:interceptor>
- </mvc:interceptors>
- <context:property-placeholder location="classpath:config.properties"/>
- <!-- 使用thymeleaf视图 -->
- <bean id="templateResolver" class="org.thymeleaf.spring4.templateresolver.SpringResourceTemplateResolver">
- <property name="order" value="0"/>
- <property name="prefix" value="${zheng-ui.path}"/>
- <property name="suffix" value=".html"/>
- <property name="templateMode" value="HTML"/>
- <property name="cacheable" value="false"/>
- </bean>
- <bean id="templateEngine" class="org.thymeleaf.spring4.SpringTemplateEngine">
- <property name="templateResolver" ref="templateResolver"/>
- <property name="enableSpringELCompiler" value="true"/>
- </bean>
- <bean class="org.thymeleaf.spring4.view.ThymeleafViewResolver">
- <property name="templateEngine" ref="templateEngine"/>
- </bean>
- </beans>
|