我有一个名为@Paging
的注释@Target({ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Inherited
public @interface Paging {
/**
* @return Size of page
*/
int size();
}
和一个名为PagingAspect的@Aspect(此bean已由spring创建)
@Aspect
public class PagingAspect {
@Around("args(@Paging java.util.List<?>, ..) && @annotation(paging)")
public Object wrapMethod(final ProceedingJoinPoint point, Paging paging) throws Throwable {
// content of method
}
}
和要成为代理的java类
public class MyGateway {
public CompletableFuture<Map<Integer, List<Integer>>>
asyncGetByIds(@Paging(size = 100)List<Integer> idList, int param1, int param2) {
// method content
}
}
但春天不编织这个类(我已经配置了CGLib编织)