public class ServletCookieValueMethodArgumentResolver extends AbstractCookieValueMethodArgumentResolver
AbstractCookieValueMethodArgumentResolver
that resolves cookie values from an HttpServletRequest
.AbstractNamedValueMethodArgumentResolver.NamedValueInfo
Constructor and Description |
---|
ServletCookieValueMethodArgumentResolver(ConfigurableBeanFactory beanFactory) |
Modifier and Type | Method and Description |
---|---|
protected Object |
resolveName(String cookieName,
MethodParameter parameter,
NativeWebRequest webRequest)
Resolve the given parameter type and value name into an argument value.
|
void |
setUrlPathHelper(UrlPathHelper urlPathHelper) |
createNamedValueInfo, handleMissingValue, handleMissingValueAfterConversion, supportsParameter
handleMissingValue, handleResolvedValue, resolveArgument
public ServletCookieValueMethodArgumentResolver(@Nullable ConfigurableBeanFactory beanFactory)
public void setUrlPathHelper(UrlPathHelper urlPathHelper)
@Nullable protected Object resolveName(String cookieName, MethodParameter parameter, NativeWebRequest webRequest) throws Exception
AbstractNamedValueMethodArgumentResolver
resolveName
in class AbstractNamedValueMethodArgumentResolver
cookieName
- the name of the value being resolvedparameter
- the method parameter to resolve to an argument value
(pre-nested in case of a Optional
declaration)webRequest
- the current requestnull
)Exception
- in case of errors