Closed
Description
Current implementation of PrePostAdviceReactiveMethodInterceptor
makes it impossible to use @Pre/PostAuthorize
with suspending functions:
// PrePostAdviceReactiveMethodInterceptor::invoke
if (!Publisher.class.isAssignableFrom(returnType)) {
throw new IllegalStateException("The returnType " + returnType + " on " + method + " must return an instance of org.reactivestreams.Publisher (i.e. Mono / Flux) in order to support Reactor Context");
}
This may be related to spring-projects/spring-framework#22462
Spring boot version: 2.2.1.RELEASE