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

commerce.broadleaf-common.3.0.15-GA.source-code.bl-common-applicationContext.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:context="http://www.springframework.org/schema/context"
    xmlns:aop="http://www.springframework.org/schema/aop"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-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/aop http://www.springframework.org/schema/aop/spring-aop-3.2.xsd">

    <context:component-scan base-package="org.broadleafcommerce.common"/>

    <bean id="blConfiguration" class="org.broadleafcommerce.common.config.RuntimeEnvironmentPropertiesConfigurer" />

    <bean id="blConfigurationManager" class="org.broadleafcommerce.common.config.RuntimeEnvironmentPropertiesManager"/>

    <bean id="blMessageCreator" class="org.broadleafcommerce.common.email.service.message.NullMessageCreator">
        <constructor-arg ref="blMailSender"/>
    </bean>
    
    <!-- to be overriden by 3rd party modules -->
    <bean id="blMergedClassTransformers" class="org.springframework.beans.factory.config.ListFactoryBean">
        <property name="sourceList">
            <list />
        </property>
    </bean>

    <bean id="blServerInfo" class="org.broadleafcommerce.common.email.service.info.ServerInfo">
        <property name="serverName" value="localhost"/>
        <property name="serverPort" value="8080"/>
    </bean>

    <bean id="blMailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
        <property name="host"><value>localhost</value></property>
        <property name="port"><value>25</value></property>
        <property name="protocol"><value>smtp</value></property>
        <property name="javaMailProperties">
            <props>
                <prop key="mail.smtp.starttls.enable">true</prop>
                <prop key="mail.smtp.timeout">25000</prop>
            </props>
        </property>
    </bean>

    <!-- This mail sender will log the html content generated for the email to the console  -->
    <!-- To enable logging set log level in Log4j to INFO  -->
    <bean id="blLoggingMailSender" class="org.broadleafcommerce.common.email.service.LoggingMailSender" />

    <bean id="blVelocityEngine" class="org.springframework.ui.velocity.VelocityEngineFactoryBean">
      <property name="velocityProperties">
         <value>
            resource.loader=class
            class.resource.loader.class=org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
            <!-- class.resource.loader.path=classpath:/config/velocity/templates/ -->
            <!-- Note that jar specification for the .path configuration property conforms to the same rules for the java.net.JarUrlConnection class-->
            <!-- jar.resource.loader.class =org.apache.velocity.runtime.resource.loader.JarResourceLoader
            jar.resource.loader.path = jar:file:/broadleaf-profile.jar/emailTemplates
            file.resource.loader.class=org.apache.velocity.runtime.resource.loader.FileResourceLoader
            file.resource.loader.cache = false
            file.resource.loader.path=${file.root}/WEB-INF/config/velocity/templates-->
         </value>
      </property>
   </bean>
    
    <bean id="blEmailInfo" class="org.broadleafcommerce.common.email.service.info.EmailInfo" />
    <bean id="blNullEmailInfo" class="org.broadleafcommerce.common.email.service.info.NullEmailInfo" />
    
    <bean id="blWebCommonClasspathTemplateResolver" class="org.thymeleaf.templateresolver.ClassLoaderTemplateResolver">
        <property name="prefix" value="common_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="500"/> 
    </bean>  
    
    <bean id="blSiteResolver" class="org.broadleafcommerce.common.web.NullBroadleafSiteResolver" />
    <bean id="blThemeResolver" class="org.broadleafcommerce.common.web.NullBroadleafThemeResolver" />
    
<!--  Message creator for velocity templates.  Now should be defined in client properties file. -->
    <!-- bean id="blMessageCreator" class="org.broadleafcommerce.common.email.service.message.VelocityMessageCreator">
        <constructor-arg ref="blVelocityEngine"/>
        <constructor-arg ref="blMailSender"/>
        <constructor-arg>
            <map>
                <entry key="number">
                    <bean class="org.apache.velocity.tools.generic.NumberTool" scope="prototype"/>
                </entry>
                <entry key="date">
                    <bean class="org.apache.velocity.tools.generic.ComparisonDateTool" scope="prototype"/>
                </entry>
                <entry key="list">
                    <bean class="org.apache.velocity.tools.generic.ListTool" scope="prototype"/>
                </entry>
                <entry key="math">
                    <bean class="org.apache.velocity.tools.generic.MathTool" scope="prototype"/>
                </entry>
                <entry key="iterator">
                    <bean class="org.apache.velocity.tools.generic.IteratorTool" scope="prototype"/>
                </entry>
                <entry key="alternator">
                    <bean class="org.apache.velocity.tools.generic.AlternatorTool" scope="prototype"/>
                </entry>
                <entry key="sorter">
                    <bean class="org.apache.velocity.tools.generic.SortTool" scope="prototype"/>
                </entry>
                <entry key="esc">
                    <bean class="org.apache.velocity.tools.generic.EscapeTool" scope="prototype"/>
                </entry>
                <entry key="serverInfo" value-ref="blServerInfo"/>
            </map>
        </constructor-arg>
    </bean  -->
    
    <bean id="blJsLocations" class="org.springframework.beans.factory.config.ListFactoryBean" >
        <property name="sourceList">
            <list>
                <value>classpath:/common_js/</value>
                <value>classpath:/extensions/js/</value><!-- To allow a common place for modules or extensions to put js files. -->
            </list>
        </property>
    </bean>
    
    <bean id="blCssLocations" class="org.springframework.beans.factory.config.ListFactoryBean" >
        <property name="sourceList">
            <list>
            </list>
        </property>
    </bean>
    
    <bean id="blJsFileList" class="org.springframework.beans.factory.config.ListFactoryBean" >
        <property name="sourceList">
            <list>
            </list>
        </property>
    </bean>
    
</beans>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy