All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.dd-job-console.webMvcContext.xml Maven / Gradle / Ivy

<?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" 
    xmlns:p="http://www.springframework.org/schema/p" 
    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
                        ">
    <context:component-scan base-package="com.dangdang.ddframe.job.lite.console.**.controller" />
    
    <mvc:resources mapping="/js/**" location="/js/" />
    <mvc:resources mapping="/css/**" location="/css/" />
    <mvc:resources mapping="/lib/**" location="/lib/" />
    <mvc:annotation-driven>
        <mvc:message-converters>
            <bean class="org.springframework.http.converter.StringHttpMessageConverter">
                <property name="supportedMediaTypes">
                    <list>
                        <value>text/html;charset=UTF-8</value>
                    </list>
                </property>
            </bean>
            <bean class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter" />
        </mvc:message-converters>
    </mvc:annotation-driven>
    
    <bean id="viewResolver" class="org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver">
        <property name="cache" value="false"/>
        <property name="order" value="1" /> 
        <property name="suffix" value=".ftl" />
        <property name="contentType" value="text/html;charset=utf-8" />
        <property name="viewClass" value="org.springframework.web.servlet.view.freemarker.FreeMarkerView" />
        <property name="requestContextAttribute" value="rc" />
    </bean>
    
    <bean id="freemarkerConfiguration" class="org.springframework.beans.factory.config.PropertiesFactoryBean" p:location="classpath:META-INF/dd-job-console/freemarker.properties" />
    <bean class="org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer" p:defaultEncoding="UTF-8" p:templateLoaderPath="/templates" p:freemarkerSettings-ref="freemarkerConfiguration" />
    
    <mvc:interceptors>
        <mvc:interceptor>
            <mvc:mapping path="/job/**"/>
            <bean class="com.dangdang.ddframe.job.lite.console.interceptor.SessionRegistryCenterConfigurationInterceptor" />
        </mvc:interceptor>
        <mvc:interceptor>
            <mvc:mapping path="/server/**"/>
            <bean class="com.dangdang.ddframe.job.lite.console.interceptor.SessionRegistryCenterConfigurationInterceptor" />
        </mvc:interceptor>
    </mvc:interceptors>
</beans>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy