类 Session.Cookie
- java.lang.Object
- org.springframework.boot.web.servlet.server.Session.Cookie
- 封闭类:
- Session
public static class Session.Cookie extends Object
Cookie properties.
构造器概要
构造器 构造器 说明 Cookie()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 String
getComment()
Return the comment for the session cookie.String
getDomain()
Return the domain for the session cookie.Boolean
getHttpOnly()
Return whether to use "HttpOnly" cookies for session cookies.Duration
getMaxAge()
Return the maximum age of the session cookie.String
getName()
Return the session cookie name.String
getPath()
Return the path of the session cookie.Boolean
getSecure()
Return whether to always mark the session cookie as secure.void
setComment(String comment)
void
setDomain(String domain)
void
setHttpOnly(Boolean httpOnly)
void
setMaxAge(Duration maxAge)
void
setName(String name)
void
setPath(String path)
void
setSecure(Boolean secure)
构造器详细资料
Cookie
public Cookie()
方法详细资料
getDomain
public String getDomain()
Return the domain for the session cookie.- 返回:
- the session cookie domain
getComment
public String getComment()
Return the comment for the session cookie.- 返回:
- the session cookie comment
setComment
public void setComment(String comment)
getHttpOnly
public Boolean getHttpOnly()
Return whether to use "HttpOnly" cookies for session cookies.- 返回:
true
to use "HttpOnly" cookies for session cookies.
setHttpOnly
public void setHttpOnly(Boolean httpOnly)
getSecure
public Boolean getSecure()
Return whether to always mark the session cookie as secure.- 返回:
true
to mark the session cookie as secure even if the request that initiated the corresponding session is using plain HTTP
getMaxAge
public Duration getMaxAge()
Return the maximum age of the session cookie.- 返回:
- the maximum age of the session cookie