Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
sts网站
Project
Project
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
liyang
sts网站
Commits
cc0efa33
Commit
cc0efa33
authored
May 29, 2024
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化代码
parent
f46b1bbe
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
4 deletions
+13
-4
CacheController.java
...ava/com/ruoyi/web/controller/monitor/CacheController.java
+2
-1
XssFilter.java
...mmon/src/main/java/com/ruoyi/common/filter/XssFilter.java
+3
-3
DictUtils.java
...ommon/src/main/java/com/ruoyi/common/utils/DictUtils.java
+8
-0
No files found.
ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/CacheController.java
View file @
cc0efa33
...
@@ -7,6 +7,7 @@ import java.util.List;
...
@@ -7,6 +7,7 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Properties
;
import
java.util.Properties
;
import
java.util.Set
;
import
java.util.Set
;
import
java.util.TreeSet
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.RedisCallback
;
import
org.springframework.data.redis.core.RedisCallback
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.data.redis.core.RedisTemplate
;
...
@@ -80,7 +81,7 @@ public class CacheController
...
@@ -80,7 +81,7 @@ public class CacheController
public
AjaxResult
getCacheKeys
(
@PathVariable
String
cacheName
)
public
AjaxResult
getCacheKeys
(
@PathVariable
String
cacheName
)
{
{
Set
<
String
>
cacheKeys
=
redisTemplate
.
keys
(
cacheName
+
"*"
);
Set
<
String
>
cacheKeys
=
redisTemplate
.
keys
(
cacheName
+
"*"
);
return
AjaxResult
.
success
(
cacheKeys
);
return
AjaxResult
.
success
(
new
TreeSet
<>(
cacheKeys
)
);
}
}
@PreAuthorize
(
"@ss.hasPermi('monitor:cache:list')"
)
@PreAuthorize
(
"@ss.hasPermi('monitor:cache:list')"
)
...
...
ruoyi-common/src/main/java/com/ruoyi/common/filter/XssFilter.java
View file @
cc0efa33
...
@@ -32,10 +32,10 @@ public class XssFilter implements Filter
...
@@ -32,10 +32,10 @@ public class XssFilter implements Filter
String
tempExcludes
=
filterConfig
.
getInitParameter
(
"excludes"
);
String
tempExcludes
=
filterConfig
.
getInitParameter
(
"excludes"
);
if
(
StringUtils
.
isNotEmpty
(
tempExcludes
))
if
(
StringUtils
.
isNotEmpty
(
tempExcludes
))
{
{
String
[]
url
=
tempExcludes
.
split
(
","
);
String
[]
url
s
=
tempExcludes
.
split
(
","
);
for
(
int
i
=
0
;
url
!=
null
&&
i
<
url
.
length
;
i
++
)
for
(
String
url
:
urls
)
{
{
excludes
.
add
(
url
[
i
]
);
excludes
.
add
(
url
);
}
}
}
}
}
}
...
...
ruoyi-common/src/main/java/com/ruoyi/common/utils/DictUtils.java
View file @
cc0efa33
...
@@ -56,6 +56,10 @@ public class DictUtils
...
@@ -56,6 +56,10 @@ public class DictUtils
*/
*/
public
static
String
getDictLabel
(
String
dictType
,
String
dictValue
)
public
static
String
getDictLabel
(
String
dictType
,
String
dictValue
)
{
{
if
(
StringUtils
.
isEmpty
(
dictValue
))
{
return
StringUtils
.
EMPTY
;
}
return
getDictLabel
(
dictType
,
dictValue
,
SEPARATOR
);
return
getDictLabel
(
dictType
,
dictValue
,
SEPARATOR
);
}
}
...
@@ -68,6 +72,10 @@ public class DictUtils
...
@@ -68,6 +72,10 @@ public class DictUtils
*/
*/
public
static
String
getDictValue
(
String
dictType
,
String
dictLabel
)
public
static
String
getDictValue
(
String
dictType
,
String
dictLabel
)
{
{
if
(
StringUtils
.
isEmpty
(
dictLabel
))
{
return
StringUtils
.
EMPTY
;
}
return
getDictValue
(
dictType
,
dictLabel
,
SEPARATOR
);
return
getDictValue
(
dictType
,
dictLabel
,
SEPARATOR
);
}
}
...
...
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