Perhaps that could be for you helpful:
<bean id="txProxyTemplate" abstract="true"
       class="
org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
       <property name="transactionManager" ref="transactionManager"/>
       <property name="transactionAttributes">
           <props>
               <prop key="save*">PROPAGATION_REQUIRED</prop>
               <prop key="remove*">PROPAGATION_REQUIRED</prop>
               <prop key="set*">PROPAGATION_REQUIRED</prop>
               <prop key="insert*">PROPAGATION_REQUIRED</prop>
               <prop key="*">PROPAGATION_REQUIRED,readOnly</prop>
For example method getUsers -> readOnly
when you have another methods you should write it here
           </props>
       </property>
   </bean>

Reply via email to