aop_learn

2019-08-01  本文已影响0人  fufufufuli
/**
 * @author fuli
 */
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE,ElementType.METHOD})
public @interface DoffDataAnnotation {
}
 @Around("@annotation(doffDataAnnotation)")
    public Object doff( ProceedingJoinPoint jp ,DoffDataAnnotation doffDataAnnotation ) throws Throwable {
        Object proceed = jp.proceed();

        Page<CarInfo> carInfoPage= (Page<CarInfo>) proceed;
        carInfoPage.getList().forEach(carInfo -> carInfo.setName("123"));
        System.out.println(2);
        return carInfoPage;
    }
上一篇 下一篇

猜你喜欢

热点阅读