Class Session
java.lang.Object
org.springframework.boot.web.servlet.server.Session
Session properties.
- Since:
- 2.0.0
- Author:
- Andy Wilkinson
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Session cookie properties.static enum
Available session tracking modes (mirrorsSessionTrackingMode
. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturn the directory used to store session data.Return thesession tracking modes
.boolean
Return whether to persist session data between restarts.void
setPersistent
(boolean persistent) void
setStoreDir
(File storeDir) void
setTimeout
(Duration timeout) void
setTrackingModes
(Set<Session.SessionTrackingMode> trackingModes)
-
Constructor Details
-
Session
public Session()
-
-
Method Details
-
getTimeout
-
setTimeout
-
getTrackingModes
Return thesession tracking modes
.- Returns:
- the session tracking modes
-
setTrackingModes
-
isPersistent
public boolean isPersistent()Return whether to persist session data between restarts.- Returns:
true
to persist session data between restarts.
-
setPersistent
public void setPersistent(boolean persistent) -
getStoreDir
Return the directory used to store session data.- Returns:
- the session data store directory
-
setStoreDir
-
getCookie
-