<?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:p= "http://www.springframework.org/schema/p"
xmlns:context= "Http://www.springframework.org/schema/context"
xmlns:aop= "http://www.springframework.org/ Schema/aop "xmlns:tx=" http://www.springframework.org/schema/tx "
xsi:schemalocation="/http/ Www.springframework.org/schema/beans
Http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
HTTP://WWW.SPRINGFRAMEWORK.ORG/SCHEMA/AOP
Http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
HTTP://WWW.SPRINGFRAMEWORK.ORG/SCHEMA/TX
Http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http ://www.springframework.org/schema/context
http://www.springframework.org/schema/context/ Spring-context-3.0.xsd "
default-autowire=" byname ";
<context:component-scan base-package= "Com.inborn.inshop"/>
<aop:aspectj-autoproxy proxy-target-class= "true"/>
<bean id= "TransactionManager"
Class= "Org.springframework.jdbc.datasource.DataSourceTransactionManager"
Lazy-init= "true" >
<property name= "DataSource" ref= "DataSource"/>
</bean>
<tx:advice id= "Txadvice" transaction-manager= "TransactionManager" >
<tx:attributes>
<tx:method name= "query*" propagation= "REQUIRED" read-only= "true"/>
<tx:method name= "save*" propagation= "REQUIRED" isolation= "Repeatable_read" timeout= "6" rollback-for= " Java.lang.exception,java.lang.runtimeexception "/>
<tx:method name= "add*" propagation= "REQUIRED" isolation= "Repeatable_read" timeout= "6" rollback-for= " Java.lang.exception,java.lang.runtimeexception "/>
<tx:method name= "insert*" propagation= "REQUIRED" isolation= "Repeatable_read" timeout= "6" rollback-for= " Java.lang.exception,java.lang.runtimeexception "/>
<tx:method name= "batch*" propagation= "REQUIRED" isolation= "Repeatable_read" timeout= "6" rollback-for= " Java.lang.exception,java.lang.runtimeexception "/>
<tx:method name= "update*" propagation= "REQUIRED" isolation= "Repeatable_read" timeout= "6" rollback-for= " Java.lang.exception,java.lang.runtimeexception "/>
<tx:method name= "del*" propagation= "REQUIRED" isolation= "Repeatable_read" timeout= "6" rollback-for= " Java.lang.exception,java.lang.runtimeexception "/>
<tx:method name= "*" propagation= "SUPPORTS" read-only= "true"/>
</tx:attributes>
</tx:advice>
<aop:config>
<aop:pointcut id= "Service"
expression= "Execution (* com.inborn.inshop.service). *.*(..))" />
<aop:advisor id= "TXADVICEAOP" advice-ref= "Txadvice"
pointcut-ref= "Service"/>
</aop:config>
</beans>
Spring Configuration Transaction XML