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

commerce.broadleaf-common.2.2.0-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.1.xsd
           http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
           http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.1.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>

    <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" />

    <aop:config>
        <aop:pointcut id="blLocaleServiceOperation" expression="execution(* org.broadleafcommerce.common.locale.service.LocaleService.*(..))"/>
        <aop:advisor advice-ref="blTxAdvice" pointcut-ref="blLocaleServiceOperation"/>
    </aop:config>         
    
<!--  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  -->
</beans>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy