简体   繁体   中英

grpc-java how to get generic type from StreamObserver<V>

I want to write a aop to grpc interface method, how can i get generic type from StreamObserver

@Around(value = "execution(* com.test.grpc.controller.*.*(..))")
    public void around(ProceedingJoinPoint point) throws Throwable {

        long methodStartTime = System.currentTimeMillis();

        String methodName = point.getSignature().getDeclaringTypeName() +
                "." + point.getSignature().getName();

        point.proceed();

    }

You can't, since it is generic.

I don't know enough about aop to provide alternatives.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM