/**
* @author RippleChan
* @date 2016-12-15
* @time 9:20
* 切面类,用来做性能分析
*/
@Component
@Aspect
public class ProcessTime {
private Long startTime;
/**
* public <E> List<E> selectList(String statement, Object parameter, RowBounds rowBounds) {
*/
@Pointcut("execution (* org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(..))")
private void method(){}
@Before("method()")
public void befor(){
this.startTime = System.currentTimeMillis();
}
@AfterReturning("method()")
public void after(){
Long endTime = System.currentTimeMillis();
Long costTime = endTime - startTime;
System.out.println("point_1:"+costTime+"");
}
}