问题
I am looking for a way to intercept the @Input annotation and add an interceptor for my Subscribable Channel
Something like below
@Around("@annotation(org.springframework.cloud.stream.annotation.Input)")
public Object interceptInput(ProceedingJoinPoint joinPoint) throws Throwable {
LOG.debug("Intercepted @Input from method : {}", joinPoint.getSignature());
Object returnValue = null;
try {
returnValue = joinPoint.proceed();
// add the interceptor for input channel
} catch (Exception e) {
LOG.warn("@Input error", e);
}
return returnValue;
}
What can i do (near the comment) to achieve this? Any other options also are welcome
来源:https://stackoverflow.com/questions/61775840/spring-cloud-stream-3-0-1-adding-channel-interceptor-around-input-annotation