Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
usedCarAuction
/
aus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 62698c81
authored
Apr 01, 2026
by
章家宝
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat: 登录验证不通过使用200而不使用401
1 parent
2e80391a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
1 deletions
aus-inspector/src/main/java/com/glsx/usedcar/interceptor/LoginInterceptor.java
aus-inspector/src/main/java/com/glsx/usedcar/interceptor/LoginInterceptor.java
View file @
62698c8
...
...
@@ -100,7 +100,7 @@ public class LoginInterceptor implements HandlerInterceptor {
private
void
returnErrorResponse
(
HttpServletResponse
response
,
String
message
)
{
response
.
setCharacterEncoding
(
"UTF-8"
);
response
.
setContentType
(
"application/json; charset=utf-8"
);
response
.
setStatus
(
HttpStatus
.
UNAUTHORIZED
.
value
());
// 401状态码
response
.
setStatus
(
HttpStatus
.
OK
.
value
());
// 401状态码
try
(
PrintWriter
writer
=
response
.
getWriter
())
{
BaseResp
<
Void
>
errorResponse
=
BaseResp
.
fail
(
ErrorCodeEnum
.
LOGIN_ERROR
);
writer
.
write
(
JSON
.
toJSONString
(
errorResponse
));
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment