美文网首页
aop(面向切面编程)aspect

aop(面向切面编程)aspect

作者: 海纳百川_4d26 | 来源:发表于2017-07-27 18:27 被阅读0次

1)使用注解@Aspect来定义一个切面,在切面中定义切入点(@Pointcut),通知类型(@Before、 @After 、@AfterReturning 、@AfterThrowing 、@Around )

2)开发需要被拦截的类

3)将切面配置到xml中,也可以使用自动扫描bean方式

3)将切面配置到xml中,也可以使用自动扫描bean方式

相关文章

网友评论

      本文标题:aop(面向切面编程)aspect

      本文链接:https://www.haomeiwen.com/subject/bectlxtx.html