Mono.currentContext()->subscriberContext()

Fixing refactoring by Reactor
This commit is contained in:
Rob Winch 2017-09-01 16:14:42 -05:00
parent b3ad174ee2
commit 72f139a824
1 changed files with 1 additions and 1 deletions

View File

@ -86,7 +86,7 @@ public class PrePostAdviceMethodInterceptor implements MethodInterceptor {
.getAttributes(method, targetClass);
PreInvocationAttribute preAttr = findPreInvocationAttribute(attributes);
Mono<Authentication> toInvoke = Mono.currentContext()
Mono<Authentication> toInvoke = Mono.subscriberContext()
.defaultIfEmpty(Context.empty())
.flatMap( cxt -> cxt.getOrDefault(Authentication.class, Mono.just(anonymous)))
.filter( auth -> this.preAdvice.before(auth, invocation, preAttr))