public final class AuthenticationPrincipalArgumentResolver extends Object implements org.springframework.messaging.handler.invocation.HandlerMethodArgumentResolver
Authentication.getPrincipal()
using the
AuthenticationPrincipal
annotation. For example, the following
Controller
:
Constructor and Description |
---|
AuthenticationPrincipalArgumentResolver() |
Modifier and Type | Method and Description |
---|---|
Object |
resolveArgument(MethodParameter parameter,
org.springframework.messaging.Message<?> message) |
boolean |
supportsParameter(MethodParameter parameter) |
public AuthenticationPrincipalArgumentResolver()
public boolean supportsParameter(MethodParameter parameter)
supportsParameter
in interface org.springframework.messaging.handler.invocation.HandlerMethodArgumentResolver
public Object resolveArgument(MethodParameter parameter, org.springframework.messaging.Message<?> message) throws Exception
resolveArgument
in interface org.springframework.messaging.handler.invocation.HandlerMethodArgumentResolver
Exception