Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nouiWithSpringMVC
Overview
Overview
Details
Activity
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
gechengyang
nouiWithSpringMVC
Commits
88d37b6a
Commit
88d37b6a
authored
Sep 25, 2020
by
WeiCong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化资源访问限制
parent
fc442dfa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
9 deletions
+4
-9
ResourceAccessFilter.java
...rg/sss/presentation/noui/filter/ResourceAccessFilter.java
+4
-9
No files found.
src/main/java/org/sss/presentation/noui/filter/ResourceAccessFilter.java
View file @
88d37b6a
...
...
@@ -2,6 +2,7 @@ package org.sss.presentation.noui.filter;
import
log.Log
;
import
log.LogFactory
;
import
org.apache.commons.io.IOUtils
;
import
org.sss.presentation.noui.jwt.RedisLoginInfo
;
import
org.sss.presentation.noui.util.RedisUtil
;
import
org.sss.presentation.noui.util.StringUtil
;
...
...
@@ -149,15 +150,9 @@ public class ResourceAccessFilter implements Filter {
ServletOutputStream
out
;
try
{
out
=
response
.
getOutputStream
();
int
b
=
0
;
byte
[]
buffer
=
new
byte
[
512
];
while
(
b
!=
-
1
)
{
b
=
inputStream
.
read
(
buffer
);
out
.
write
(
buffer
,
0
,
b
);
}
inputStream
.
close
();
out
.
close
();
out
.
flush
();
IOUtils
.
copy
(
inputStream
,
out
);
IOUtils
.
closeQuietly
(
inputStream
);
IOUtils
.
closeQuietly
(
out
);
}
catch
(
IOException
e
)
{
log
.
warn
(
"Access Pdfs IOException"
);
}
...
...
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