<!--
配置事務操做 -->
<
bean
id
="transactionManager"
class
="org.springframework.orm.hibernate3.HibernateTransactionManager"
>
<
property
name
="sessionFactory"
ref
="sessionFactory"
/>
</
bean
>
<
tx:advice
id
="txAdvice"
transactionmanager
="transactionManager"
>
<
tx:attributes
>
<
tx:method
name
="add*"
propagation
="REQUIRED"
/>
<
tx:method
name
="insert*"
propagation
="REQUIRED"
/>
<
tx:method
name
="delete*"
propagation
="REQUIRED"
/>
<
tx:method
name
="update*"
propagation
="REQUIRED"
/>
<
tx:method
name
="find*"
read-only
="false"
propagation
="SUPPORTS"
/>
<
tx:method
name
="select*"
read-only
="false"
propagation
="SUPPORTS"
/>
</
tx:attributes
>
</
tx:advice
>
<
aop:config
>
<
aop:pointcut
id
="point"
expression
="execution(* com.dao.*.*(..))"
/>
<
aop:advisor
advice-ref
="txAdvice"
pointcut-ref
="point"
/>
</
aop:config
>