Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
sentinel
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
曲欣亮
sentinel
Commits
b7277067
Commit
b7277067
authored
Nov 14, 2018
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xxx
parent
459e0dbe
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
MemberLoginController.java
...java/com/egolm/film/api/member/MemberLoginController.java
+5
-0
LocaleCookieInterceptor.java
...golm/film/config/interceptor/LocaleCookieInterceptor.java
+7
-2
No files found.
src/main/java/com/egolm/film/api/member/MemberLoginController.java
View file @
b7277067
...
...
@@ -13,6 +13,8 @@ import com.egolm.film.config.XException;
import
com.egolm.film.model.LoginToken
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
@Api
...
...
@@ -29,6 +31,9 @@ public class MemberLoginController {
@ResponseBody
@PostMapping
(
"login"
)
@ApiOperation
(
"登陆"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"header"
,
dataType
=
"string"
,
name
=
"i18n_language"
)
})
public
Object
login
(
String
username
,
String
password
)
{
XException
.
assertNotBlank
(
messages
.
get
(
"err.user_pwd_null"
),
username
,
password
);
if
(
tokenService
.
isLogin
())
{
...
...
src/main/java/com/egolm/film/config/interceptor/LocaleCookieInterceptor.java
View file @
b7277067
...
...
@@ -30,9 +30,9 @@ public class LocaleCookieInterceptor extends HandlerInterceptorAdapter {
public
String
getParameterValue
(
HttpServletRequest
request
,
String
name
)
{
String
value
=
request
.
get
Paramet
er
(
name
);
String
value
=
request
.
get
Head
er
(
name
);
if
(
StringUtil
.
isBlank
(
value
))
{
value
=
request
.
get
Head
er
(
name
);
value
=
request
.
get
Paramet
er
(
name
);
}
if
(
StringUtil
.
isBlank
(
value
))
{
Cookie
[]
cookies
=
request
.
getCookies
();
...
...
@@ -46,4 +46,9 @@ public class LocaleCookieInterceptor extends HandlerInterceptorAdapter {
}
return
value
;
}
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
"i18n_language"
.
equals
(
language
));
System
.
out
.
println
(
"en_US"
.
matches
(
"[a-z]{2}_[A-Z]{2}"
));
}
}
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