<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
    "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
 <bean id="txProxyTemplate" abstract="true" lazy-init="true"
  class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
  <property name="transactionManager" ref="transactionManager" />
  <property name="transactionAttributes">
   <props>
    <prop key="save*">PROPAGATION_REQUIRED</prop>
    <prop key="delete*">PROPAGATION_REQUIRED</prop>
    <prop key="remove*">PROPAGATION_REQUIRED</prop>
    <prop key="*">PROPAGATION_REQUIRED,readOnly</prop>
   </props>
  </property>
 </bean>

 <!-- Generic manager that can be used to do basic CRUD operations on any objects -->
 <bean id="baseManager" parent="txProxyTemplate">
  <property name="target">
   <bean
    class="com.wondtech.framework.service.impl.BaseManagerImpl">
    <property name="baseDao" ref="baseDao" />
   </bean>
  </property>
 </bean>

 <!-- authorization proxy bean -->
 <bean id="sysUserAuthorization" parent="txProxyTemplate">
  <property name="target">
   <bean
    class="com.wondtech.core.authorization.service.impl.AuthorizationProxyImpl">
    <property name="sysLogDao" ref="sysLogDao" />
    <property name="roleFunctiondao"
     ref="sysRoleFunctionDao" />
    <property name="userRoledao" ref="sysUserRoleDao" />
    <property name="userPermissdao" ref="sysUserPermissDao" />
    <property name="functiondao" ref="sysFunctionDao" />
   </bean>
  </property>
  <property name="transactionAttributes">
   <props>
    <prop key="save*">
     PROPAGATION_REQUIRED,+ManagerException
    </prop>
    <prop key="delete*">
     PROPAGATION_REQUIRED,-ManagerException
    </prop>
    <prop key="*">PROPAGATION_REQUIRED,readOnly</prop>
   </props>
  </property>
 </bean>

</beans>