public final class CsrfTokenArgumentResolver
extends java.lang.Object
implements org.springframework.web.method.support.HandlerMethodArgumentResolver
CsrfToken
. For example, the following
RestController
will resolve the current CsrfToken
:
@RestController
public class MyController {
@MessageMapping("/im")
public CsrfToken csrf(CsrfToken token) {
return token;
}
}
Constructor and Description |
---|
CsrfTokenArgumentResolver() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
resolveArgument(org.springframework.core.MethodParameter parameter,
org.springframework.web.method.support.ModelAndViewContainer mavContainer,
org.springframework.web.context.request.NativeWebRequest webRequest,
org.springframework.web.bind.support.WebDataBinderFactory binderFactory) |
boolean |
supportsParameter(org.springframework.core.MethodParameter parameter) |
public boolean supportsParameter(org.springframework.core.MethodParameter parameter)
supportsParameter
in interface org.springframework.web.method.support.HandlerMethodArgumentResolver
public java.lang.Object resolveArgument(org.springframework.core.MethodParameter parameter, org.springframework.web.method.support.ModelAndViewContainer mavContainer, org.springframework.web.context.request.NativeWebRequest webRequest, org.springframework.web.bind.support.WebDataBinderFactory binderFactory) throws java.lang.Exception
resolveArgument
in interface org.springframework.web.method.support.HandlerMethodArgumentResolver
java.lang.Exception