Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xzxt-api-report
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
雷紫添
xzxt-api-report
Commits
d9480e6a
Commit
d9480e6a
authored
Aug 22, 2022
by
wang_jiaxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
校验注解
parent
edeee2d8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
src/main/java/com/founder/checkAuthorization/config/AuthorizationInterceptor.java
+5
-2
No files found.
src/main/java/com/founder/checkAuthorization/config/AuthorizationInterceptor.java
View file @
d9480e6a
...
@@ -31,6 +31,9 @@ public class AuthorizationInterceptor implements HandlerInterceptor {
...
@@ -31,6 +31,9 @@ public class AuthorizationInterceptor implements HandlerInterceptor {
@Autowired
@Autowired
private
AuthorizationMapper
authorizationMapper
;
private
AuthorizationMapper
authorizationMapper
;
public
static
String
appId
=
"founder.appId"
;
public
static
String
appSecret
=
"founder.appSecret"
;
@Override
@Override
public
boolean
preHandle
(
HttpServletRequest
request
,
HttpServletResponse
response
,
Object
handler
)
throws
Exception
{
public
boolean
preHandle
(
HttpServletRequest
request
,
HttpServletResponse
response
,
Object
handler
)
throws
Exception
{
if
(!(
handler
instanceof
HandlerMethod
))
{
if
(!(
handler
instanceof
HandlerMethod
))
{
...
@@ -64,8 +67,8 @@ public class AuthorizationInterceptor implements HandlerInterceptor {
...
@@ -64,8 +67,8 @@ public class AuthorizationInterceptor implements HandlerInterceptor {
response
.
setContentType
(
"application/json; charset=utf-8"
);
response
.
setContentType
(
"application/json; charset=utf-8"
);
boolean
success
=
true
;
boolean
success
=
true
;
String
message
=
""
;
String
message
=
""
;
String
appId
=
request
.
getHeader
(
"founder.appId"
);
String
appId
=
request
.
getHeader
(
AuthorizationInterceptor
.
appId
);
String
appSecret
=
request
.
getHeader
(
"founder.appSecret"
);
String
appSecret
=
request
.
getHeader
(
AuthorizationInterceptor
.
appSecret
);
if
(
StringUtils
.
isEmpty
(
appId
))
{
if
(
StringUtils
.
isEmpty
(
appId
))
{
success
=
false
;
success
=
false
;
message
=
"appId为空,不能查询!"
;
message
=
"appId为空,不能查询!"
;
...
...
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