grails

xmlns aop:"http://www.springframework.org/schema/aop"

aop{
config("proxy-target-class":true){
aspect(id: "myAspectId", ref: "myAspect"){
after method: "onAfter", pointcut: "execution(* org.lee..*Service.*(..))"
}
}
}

myAspect(org.lee.aspect.MyAspect)


class MyAspect {

void onAfter(){
println "after method"
}
}

你可能感兴趣的:(grails)