public final class AuthenticationPrincipalArgumentResolver extends Object implements 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,
ModelAndViewContainer mavContainer,
NativeWebRequest webRequest,
WebDataBinderFactory binderFactory) |
boolean |
supportsParameter(MethodParameter parameter) |
public AuthenticationPrincipalArgumentResolver()
public boolean supportsParameter(MethodParameter parameter)
supportsParameter
in interface HandlerMethodArgumentResolver
public Object resolveArgument(MethodParameter parameter, ModelAndViewContainer mavContainer, NativeWebRequest webRequest, WebDataBinderFactory binderFactory) throws Exception
resolveArgument
in interface HandlerMethodArgumentResolver
Exception