切面的优先级

@Order(1)注解

指定切面的优先级,值越小优先级越高

@Order(1)
@Aspect
@Component
public class VlidationAspect { @Before("execution(public int com.tanlei.spring.bean.AspectJ.AtithmeticCalculator.*(..))")
public void VlidationAspect(JoinPoint joinPoint) {
System.out.println("------>Vlidation: "+Arrays.asList(joinPoint.getArgs()));
}
}

重用切点表达式

定义一个方法,用于声明切入点表达式.一般的,该方法中不需要添入其他的代码(不同包得引入包名)

/**
*
*tanlei
*2018年12月19日
*定义一个方法,用于声明切入点表达式.一般的,该方法中不需要添入其他的代码
*/
@Pointcut("execution(* com.tanlei.spring.bean.AspectJ.AtithmeticCalculator.*(..))")
public void declareJointPointExpression() { } @Before("declareJointPointExpression()")

最新文章

  1. 用RollViewPager实现Android滚动banner
  2. C++ 中static 使用大全
  3. GreenDao官方文档翻译(下)
  4. NMAP扫描UDP123NTP端口详解
  5. 在C51中如何实现软复位?
  6. poj1487
  7. 云计算分布式大数据神器Spark实战高手之旅
  8. Linux下MySQL安装和配置
  9. 栈到CLR
  10. C# string contains 不区分大小写
  11. python迭代-如何在一个for语句中迭代多个可迭代对象
  12. STM32F103引脚功能定义
  13. 面试简单整理之rabbitmq
  14. struts2框架学习之第一天
  15. C#为什么要多线程开发(一)
  16. CentOS7.5下安装、配置mariadb --CentOS7.5
  17. [LeetCode&Python] Problem 520. Detect Capital
  18. SWIFT中用Switch case 类类型
  19. 软工1816 · Beta冲刺(3/7)
  20. HDU 2089 不要62(数位DP·记忆化搜索)

热门文章

  1. EasyUI Tree与Datagrid联动
  2. Windows 下 MQTT 服务器搭建之Apollo
  3. leyou_05_文件上传
  4. 原生js实现头像大屏随机显示
  5. mysql不创建表 <property name="hbm2ddl.auto">update</property> 无效
  6. java 集合存储对象且根据对象属性排序
  7. HDFS常用Java API
  8. HDFS 数据存取策略
  9. golang中函数类型
  10. node.js install and cecium apply