Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
25c4f0b5
Commit
25c4f0b5
authored
Nov 24, 2016
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '1.4.x' into 1.5.x
parents
57605b67
1f828193
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
FileSessionPersistence.java
...oot/context/embedded/undertow/FileSessionPersistence.java
+8
-4
No files found.
spring-boot/src/main/java/org/springframework/boot/context/embedded/undertow/FileSessionPersistence.java
View file @
25c4f0b5
/*
/*
* Copyright 2012-201
5
the original author or authors.
* Copyright 2012-201
6
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -30,10 +30,13 @@ import java.util.Map;
...
@@ -30,10 +30,13 @@ import java.util.Map;
import
io.undertow.servlet.UndertowServletLogger
;
import
io.undertow.servlet.UndertowServletLogger
;
import
io.undertow.servlet.api.SessionPersistenceManager
;
import
io.undertow.servlet.api.SessionPersistenceManager
;
import
org.springframework.core.ConfigurableObjectInputStream
;
/**
/**
* {@link SessionPersistenceManager} that stores session information in a file.
* {@link SessionPersistenceManager} that stores session information in a file.
*
*
* @author Phillip Webb
* @author Phillip Webb
* @author Peter Leibiger
* @since 1.3.0
* @since 1.3.0
*/
*/
public
class
FileSessionPersistence
implements
SessionPersistenceManager
{
public
class
FileSessionPersistence
implements
SessionPersistenceManager
{
...
@@ -82,7 +85,7 @@ public class FileSessionPersistence implements SessionPersistenceManager {
...
@@ -82,7 +85,7 @@ public class FileSessionPersistence implements SessionPersistenceManager {
try
{
try
{
File
file
=
getSessionFile
(
deploymentName
);
File
file
=
getSessionFile
(
deploymentName
);
if
(
file
.
exists
())
{
if
(
file
.
exists
())
{
return
load
(
file
);
return
load
(
file
,
classLoader
);
}
}
}
}
catch
(
Exception
ex
)
{
catch
(
Exception
ex
)
{
...
@@ -91,9 +94,10 @@ public class FileSessionPersistence implements SessionPersistenceManager {
...
@@ -91,9 +94,10 @@ public class FileSessionPersistence implements SessionPersistenceManager {
return
null
;
return
null
;
}
}
private
Map
<
String
,
PersistentSession
>
load
(
File
file
)
private
Map
<
String
,
PersistentSession
>
load
(
File
file
,
ClassLoader
classLoader
)
throws
IOException
,
ClassNotFoundException
{
throws
IOException
,
ClassNotFoundException
{
ObjectInputStream
stream
=
new
ObjectInputStream
(
new
FileInputStream
(
file
));
ObjectInputStream
stream
=
new
ConfigurableObjectInputStream
(
new
FileInputStream
(
file
),
classLoader
);
try
{
try
{
return
load
(
stream
);
return
load
(
stream
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment