Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
device-new-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
device-new-platform
Commits
99666737
Commit
99666737
authored
Nov 17, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加资源扫描接口
parent
dc86e1a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
device-manager/src/main/java/com/mortals/xhx/common/utils/ControllerScanUtil.java
...java/com/mortals/xhx/common/utils/ControllerScanUtil.java
+13
-1
No files found.
device-manager/src/main/java/com/mortals/xhx/common/utils/ControllerScanUtil.java
View file @
99666737
...
@@ -29,6 +29,8 @@ public class ControllerScanUtil {
...
@@ -29,6 +29,8 @@ public class ControllerScanUtil {
public
static
final
String
[]
ULR_VIEW
=
{
"view"
,
"info"
,
"list"
,
"get"
,
"find"
,
"export"
,
"download"
,
public
static
final
String
[]
ULR_VIEW
=
{
"view"
,
"info"
,
"list"
,
"get"
,
"find"
,
"export"
,
"download"
,
"index"
,
"bill"
};
"index"
,
"bill"
};
public
static
final
String
[]
WHITE_URL
=
{
"login"
,
"test"
};
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
List
<
Class
<?>>
classList
=
getAllClassByPackageName
(
"com.mortals.xhx"
);
List
<
Class
<?>>
classList
=
getAllClassByPackageName
(
"com.mortals.xhx"
);
...
@@ -47,7 +49,7 @@ public class ControllerScanUtil {
...
@@ -47,7 +49,7 @@ public class ControllerScanUtil {
if
(!
exits
)
{
if
(!
exits
)
{
continue
;
continue
;
}
}
//白名单地址的 也不需要
ResourceEntity
resourceViewEntity
=
new
ResourceEntity
();
ResourceEntity
resourceViewEntity
=
new
ResourceEntity
();
resourceViewEntity
.
initAttrValue
();
resourceViewEntity
.
initAttrValue
();
ResourceEntity
resourceEditEntity
=
new
ResourceEntity
();
ResourceEntity
resourceEditEntity
=
new
ResourceEntity
();
...
@@ -78,6 +80,16 @@ public class ControllerScanUtil {
...
@@ -78,6 +80,16 @@ public class ControllerScanUtil {
String
prefix
=
""
;
String
prefix
=
""
;
if
(
requestMappingCls
!=
null
)
{
if
(
requestMappingCls
!=
null
)
{
prefix
=
"/"
+
requestMappingCls
.
value
()[
0
];
prefix
=
"/"
+
requestMappingCls
.
value
()[
0
];
boolean
b
=
false
;
for
(
String
s
:
WHITE_URL
)
{
if
(
StrUtil
.
contains
(
requestMappingCls
.
value
()[
0
].
toLowerCase
(),
s
))
{
b
=
true
;
break
;
}
}
if
(
b
)
{
continue
;
}
}
}
if
(
ObjectUtils
.
isEmpty
(
result
))
{
if
(
ObjectUtils
.
isEmpty
(
result
))
{
...
...
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