aop_learn

作者: fufufufuli | 来源:发表于2019-08-01 09:15 被阅读0次
/**
 * @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;
    }

相关文章

网友评论

      本文标题:aop_learn

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