AOPの配置
4578 ワード
aopalliance
aopalliance
1.0
org.aspectj
aspectjweaver
1.7.2
package com.sys.aop;
public class Log {
public void operationBefore(){
System.out.println(" 。。");
}
public void operationAfter(){
System.out.println(" 。。");
}
}
id="log" class="com.sys.aop.Log">
<aop:config>
<aop:aspect ref="log">
<aop:pointcut
expression="execution(* com.sys.controller.*.*(..))"
id="chiefPointCut" />
<aop:before method="operationBefore" pointcut-ref="chiefPointCut" />
<aop:before method="operationAfter" pointcut-ref="chiefPointCut" />
aop:aspect>
aop:config>