aop_learn

/**
 * @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 carInfoPage= (Page) proceed;
        carInfoPage.getList().forEach(carInfo -> carInfo.setName("123"));
        System.out.println(2);
        return carInfoPage;
    }

你可能感兴趣的:(aop_learn)