("execution(……割り当てるメソッドの指定……)")
* com.tuyano.libro.aop.SampleAopBean.*(..)
○○ com.tuyano.libro.aop.SampleAopBean.○○(○○)
※リストが表示されない場合
AddBlockなどの広告ブロックツールがONになっているとリストなどが表示されない場合があります。これらのツールをOFFにしてみてください。
package com.tuyano.libro.aop; import org.aspectj.lang.annotation.After; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Before; @Aspect public class SampleAspect { @Before("execution(* com.tuyano.libro.aop.SampleAopBean.*(..))") public void before() { System.out.println("before:"); } @After("execution(* com.tuyano.libro.aop.SampleAopBean.*(..))") public void after() { System.out.println("after:"); } }
<< 前へ | 次へ >> |