类 ServletCookieValueMethodArgumentResolver
- java.lang.Object
- org.springframework.web.method.annotation.AbstractNamedValueMethodArgumentResolver
- org.springframework.web.method.annotation.AbstractCookieValueMethodArgumentResolver
- org.springframework.web.servlet.mvc.method.annotation.ServletCookieValueMethodArgumentResolver
- 所有已实现的接口:
HandlerMethodArgumentResolver
public class ServletCookieValueMethodArgumentResolver extends AbstractCookieValueMethodArgumentResolver
AnAbstractCookieValueMethodArgumentResolverthat resolves cookie values from anHttpServletRequest.- 从以下版本开始:
- 3.1
- 作者:
- Rossen Stoyanchev
嵌套类概要
从类继承的嵌套类/接口 org.springframework.web.method.annotation.AbstractNamedValueMethodArgumentResolver
AbstractNamedValueMethodArgumentResolver.NamedValueInfo
构造器概要
构造器 构造器 说明 ServletCookieValueMethodArgumentResolver(ConfigurableBeanFactory beanFactory)
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected ObjectresolveName(String cookieName, MethodParameter parameter, NativeWebRequest webRequest)Resolve the given parameter type and value name into an argument value.voidsetUrlPathHelper(UrlPathHelper urlPathHelper)从类继承的方法 org.springframework.web.method.annotation.AbstractCookieValueMethodArgumentResolver
createNamedValueInfo, handleMissingValue, supportsParameter
从类继承的方法 org.springframework.web.method.annotation.AbstractNamedValueMethodArgumentResolver
handleMissingValue, handleResolvedValue, resolveArgument
构造器详细资料
ServletCookieValueMethodArgumentResolver
public ServletCookieValueMethodArgumentResolver(@Nullable ConfigurableBeanFactory beanFactory)
方法详细资料
setUrlPathHelper
public void setUrlPathHelper(UrlPathHelper urlPathHelper)
resolveName
@Nullable protected Object resolveName(String cookieName, MethodParameter parameter, NativeWebRequest webRequest) throws Exception
Resolve the given parameter type and value name into an argument value.- 指定者:
resolveName在类中AbstractNamedValueMethodArgumentResolver- 参数:
cookieName- the name of the value being resolvedparameter- the method parameter to resolve to an argument value (pre-nested in case of aOptionaldeclaration)webRequest- the current request- 返回:
- the resolved argument (may be
null) - 抛出:
Exception- in case of errors