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

commerce.broadleaf-open-admin-platform.3.0.15-GA.source-code.applicationContext-servlet-open-admin.xml Maven / Gradle / Ivy

There is a newer version: 3.1.15-GA
Show newest version
<?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:aop="http://www.springframework.org/schema/aop"
       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-3.2.xsd
            http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.2.xsd
            http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd
            http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd">

    <aop:config/>

    <!-- Scan Broadleaf defined web utility classes -->
    <context:component-scan base-package="org.broadleafcommerce.openadmin.web.controller"/>
    
    <bean id="blAdminStructuredContentController" class="org.broadleafcommerce.cms.admin.web.controller.AdminStructuredContentController" />

    <bean class="org.springframework.web.servlet.view.BeanNameViewResolver">
        <property name="order" value="1"/>
    </bean>
    
    <bean id="multipartResolver"
        class="org.springframework.web.multipart.commons.CommonsMultipartResolver">     
        <property name="maxUploadSize" value="${asset.server.max.uploadable.file.size}"/>
    </bean>    
    
    <mvc:annotation-driven/>
    
    <bean class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping">
        <property name="useSuffixPatternMatch" value="false" />
    </bean>

    <context:component-scan base-package="org.broadleafcommerce.openadmin.web.controller" />

    <bean id="blAdminDialect" class="org.broadleafcommerce.common.web.dialect.BLCAdminDialect">
        <property name="processors">
            <set>
                <ref bean="blAdminUserProcessor"/>
                <ref bean="blAdminComponentIdProcessor"/>
                <ref bean="blAdminModuleProcessor"/>
                <ref bean="blAdminSectionHrefProcessor"/>
                <ref bean="blAdminFieldBuilderProcessor"/>
                <ref bean="blErrorsProcessor"/>
            </set>
        </property>
    </bean>
    
    <!-- This component should be overridden to provide templates outside of the WAR or CLASSPATH   -->    
    <bean id="blAdminWebCustomTemplateResolver" class="org.broadleafcommerce.common.web.NullBroadleafTemplateResolver" />
    
    <bean id="blAdminExceptionResolver" class="org.broadleafcommerce.openadmin.web.handler.AdminMappingExceptionResolver">
        <property name="showDebugMessage" value="${exception.showDebugMessage}" />
    </bean>

    <bean id="blAdminWebTemplateResolver" class="org.thymeleaf.templateresolver.ServletContextTemplateResolver">
        <property name="prefix" value="/WEB-INF/templates/admin/" />
        <property name="suffix" value=".html" />
        <property name="templateMode" value="HTML5" />
        <property name="cacheable" value="${cache.page.templates}"/>
        <property name="cacheTTLMs" value="${cache.page.templates.ttl}" />
        <property name="characterEncoding" value="UTF-8" />
        <property name="order" value="200"/>         
    </bean>
    
    <bean id="blAdminWebClasspathTemplateResolver" class="org.thymeleaf.templateresolver.ClassLoaderTemplateResolver">
        <property name="prefix" value="open_admin_style/templates/" />
        <property name="suffix" value=".html" />
        <property name="templateMode" value="HTML5" />        
        <property name="characterEncoding" value="UTF-8" />
        <property name="cacheable" value="${cache.page.templates}"/>
        <property name="cacheTTLMs" value="${cache.page.templates.ttl}" />
        <property name="order" value="300"/> 
    </bean>  

    <bean id="blAdminMessageResolver" class="org.broadleafcommerce.common.web.BroadleafThymeleafMessageResolver" />
    
    <bean id="blAdminWebTemplateResolvers" class="org.springframework.beans.factory.config.SetFactoryBean">
        <property name="sourceSet">
            <set>
                <ref bean="blAdminWebCustomTemplateResolver" />
                <ref bean="blAdminWebTemplateResolver" />
                <ref bean="blAdminWebClasspathTemplateResolver" />
                <ref bean="blWebCommonClasspathTemplateResolver" />
            </set>
        </property>
    </bean>
                
    <bean id="blAdminWebTemplateEngine" class="org.thymeleaf.spring3.SpringTemplateEngine">
        <property name="messageResolvers">
            <set>
                <ref bean="blAdminMessageResolver" />
                <bean class="org.thymeleaf.spring3.messageresolver.SpringMessageResolver" />
            </set>
        </property>
        <property name="templateResolvers" ref="blAdminWebTemplateResolvers" />
        <property name="dialects">
            <set>
                <ref bean="thymeleafSpringStandardDialect" />
                <ref bean="blAdminDialect" />
                <ref bean="blDialect" />
            </set>
        </property>
        <!--<property name="cacheManager"><null/></property>-->
    </bean>

    <bean id="blAdminTranslationControllerExtensionListeners" class="org.springframework.beans.factory.config.ListFactoryBean">
        <property name="sourceList">
            <list>
            </list>
        </property>
    </bean>

    <mvc:interceptors>
      <bean class="org.broadleafcommerce.openadmin.web.compatibility.JSFieldNameCompatibilityInterceptor" />
    </mvc:interceptors>
</beans>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy