ITeye博客

AspectJ中使用CGLIB

black_angle · 2010-04-27 11:32 · 异常和错误 · 企业架构 · Markdown

在spring中,当对没有实现接口的类使用aspect的时候,可以使用CGLIB,<aop:aspectj-autoproxy proxy-target-class="true"/>

 

写道

@Aspect
@Component("updateInvocationDefinitionSource")
public class UpdateInvocationDefinitionSource {
     @AfterReturning("execution(* com.mawujun.facade.MenuManager.save(..))")
     public void saveMenu() throws Exception{

           System.out.println("-----------------------");

      }

}

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。