mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2025-01-07 10:26:32 +01:00
113 lines
4.8 KiB
XML
Executable File
113 lines
4.8 KiB
XML
Executable File
<?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"
|
|
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">
|
|
|
|
<context:property-placeholder location="/WEB-INF/app.properties" ignore-unresolvable="true"/>
|
|
|
|
<bean id="mailer" class="com.wisemapping.mail.Mailer" scope ="singleton">
|
|
<constructor-arg index="0" value="${mail.serverSendEmail}"/>
|
|
<constructor-arg index="1" value="${mail.supportEmail}"/>
|
|
<constructor-arg index="2" value="${mail.errorReporterEmail}"/>
|
|
|
|
<property name="mailSender" ref="mailSender"/>
|
|
<property name="velocityEngine" ref="velocityEngine"/>
|
|
</bean>
|
|
|
|
<bean id="userServiceTarget" class="com.wisemapping.service.UserServiceImpl">
|
|
<property name="userManager" ref="userManager"/>
|
|
<property name="mindmapService" ref="mindMapServiceTarget"/>
|
|
<property name="notificationService" ref="notificationService"/>
|
|
<property name="messageSource" ref="messageSource"/>
|
|
<property name="velocityEngine" ref="velocityEngine"/>
|
|
</bean>
|
|
|
|
<bean id="userService" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
|
|
<property name="transactionManager" ref="transactionManager"/>
|
|
<property name="target">
|
|
<ref local="userServiceTarget"/>
|
|
</property>
|
|
<property name="transactionAttributes">
|
|
<props>
|
|
<prop key="*">PROPAGATION_REQUIRED</prop>
|
|
</props>
|
|
</property>
|
|
</bean>
|
|
|
|
<bean id="mindMapServiceTarget" class="com.wisemapping.service.MindmapServiceImpl">
|
|
<property name="mindmapManager" ref="mindmapManager"/>
|
|
<property name="userService" ref="userService"/>
|
|
<property name="notificationService" ref="notificationService"/>
|
|
<property name="adminUser" value="${admin.user}"/>
|
|
</bean>
|
|
|
|
<bean id="mindmapService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
|
<property name="proxyInterfaces" value="com.wisemapping.service.MindmapService"/>
|
|
<property name="interceptorNames">
|
|
<list>
|
|
<value>txInterceptor</value>
|
|
<value>viewSecurityAdvisor</value>
|
|
<value>updateSecurityAdvisor</value>
|
|
</list>
|
|
</property>
|
|
<property name="target" ref="mindMapServiceTarget"/>
|
|
</bean>
|
|
|
|
|
|
<bean id="labelServiceTarget" class="com.wisemapping.service.LabelServiceImpl">
|
|
<property name="labelManager" ref="labelManager"/>
|
|
</bean>
|
|
|
|
<bean id="labelService" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
|
|
<property name="transactionManager" ref="transactionManager"/>
|
|
<property name="target">
|
|
<ref local="labelServiceTarget"/>
|
|
</property>
|
|
<property name="transactionAttributes">
|
|
<props>
|
|
<prop key="*">PROPAGATION_REQUIRED</prop>
|
|
</props>
|
|
</property>
|
|
</bean>
|
|
|
|
<bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
|
|
<property name="host" value="${mail.smtp.host}"/>
|
|
<property name="port" value="${mail.smtp.port}"/>
|
|
<property name="protocol" value="smtp"/>
|
|
<property name="username" value="${mail.username}"/>
|
|
<property name="password" value="${mail.password}"/>
|
|
<property name="javaMailProperties">
|
|
<props>
|
|
<prop key="mail.smtp.auth">${mail.smtp.auth}</prop>
|
|
<prop key="mail.smtp.starttls.enable">${mail.smtp.starttls.enable}</prop>
|
|
<prop key="mail.smtp.quitwait">${mail.smtp.quitwait}</prop>
|
|
</props>
|
|
</property>
|
|
</bean>
|
|
|
|
<bean id="velocityEngine" class="org.springframework.ui.velocity.VelocityEngineFactoryBean">
|
|
<property name="velocityProperties">
|
|
<value>
|
|
resource.loader=class
|
|
class.resource.loader.class=org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
|
|
</value>
|
|
</property>
|
|
</bean>
|
|
|
|
<bean id="notificationService" class="com.wisemapping.mail.NotificationService" scope ="singleton">
|
|
<property name="baseUrl" value="${site.baseurl}"/>
|
|
<property name="mailer" ref="mailer"/>
|
|
</bean>
|
|
|
|
<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
|
|
<property name="basenames">
|
|
<list>
|
|
<value>messages</value>
|
|
</list>
|
|
</property>
|
|
</bean>
|
|
|
|
</beans>
|