1.public 方法才可以作为切入点
2. aop:config
<aop:pointcut expression=“execution(* dao.UsersDao.*(…))” id=“pc”/>
</aop:config>
解释:
execution(完整的方法)
public:quesheng
*:任意返回值类型或者没有返回值void
a * 以a开头的任意方法
* b 以b结尾的任意方法
(…) 参数 两个点,表示方法的参数任意类型,任意多个(包括没有)
3.
<tx:advice id=“txAdvice” transaction-manager=“transactionManager”>
tx:attributes
<tx:method name=“add*” rollback-for=“Exception”/>
<tx:method name="*" isolation=“DEFAULT” read-only=“false” timeout="-1" propagation=“REQUIRED”/>
<:attributes>
<:advice>