日期:2014-05-17 浏览次数:20944 次
@Pointcut(execution(* get*()))
public void propertyAccess() {}
@Pointcut(execution(org.xyz.Account+ *(..))
public void operationReturningAnAccount() {}
@Pointcut(propertyAccess() && operationReturningAnAccount())
public void accountPropertyAccess() {}
<aop:pointcut id="propertyAccess"
expression="execution(* get*())"/>
<aop:pointcut id="operationReturningAnAccount"
expression="execution(org.xyz.Account+ *(..))"/>
<!-- 错误的配置 -->
<aop:pointcut id="accountPropertyAccess"
expression="propertyAccess && operationReturningAnAccount"/>
<aop:pointcut id="propertyAccess"
expression="execution(* get*())"/>
<aop:pointcut id="operationReturningAnAccount"
expression="execution(org.xyz.Account+ *(..))"/>
<aop:pointcut id="accountPropertyAccess"
expression="execution(* get*()) and execution(org.xyz.Account+ *(..))"/>