AspectJ中使用CGLIB

在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("-----------------------"); 

      } 

}

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-15
  • 2021-06-16
  • 2021-08-08
  • 2021-11-12
猜你喜欢
  • 2021-12-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-29
相关资源
相似解决方案