Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
A
antai-sport-http-server
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
antai-sport
antai-sport-http-server
Commits
25e8d0f7
Commit
25e8d0f7
authored
Apr 11, 2022
by
liming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增服务端api
parent
96ee4ca8
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
214 additions
and
12 deletions
+214
-12
TokenService.java
.../com/antai/sport/http/server/common/jwt/TokenService.java
+6
-6
application-dev.yaml
mobile-api/src/main/resources/application-dev.yaml
+0
-2
application-local.yaml
mobile-api/src/main/resources/application-local.yaml
+0
-2
application-test.yaml
mobile-api/src/main/resources/application-test.yaml
+0
-2
application.yaml
mobile-api/src/main/resources/application.yaml
+2
-0
pom.xml
pom.xml
+1
-0
pom.xml
server-api/pom.xml
+59
-0
ServerApiApplication.java
...ai/sport/http/server/server/api/ServerApiApplication.java
+17
-0
TestController.java
...om/antai/sport/http/server/server/api/TestController.java
+18
-0
application-dev.yaml
server-api/src/main/resources/application-dev.yaml
+14
-0
application-local.yaml
server-api/src/main/resources/application-local.yaml
+13
-0
application-prod.yaml
server-api/src/main/resources/application-prod.yaml
+11
-0
application-test.yaml
server-api/src/main/resources/application-test.yaml
+14
-0
application.yaml
server-api/src/main/resources/application.yaml
+59
-0
No files found.
common/src/main/java/com/antai/sport/http/server/common/jwt/TokenService.java
View file @
25e8d0f7
...
...
@@ -18,17 +18,17 @@ import java.util.Map;
*/
@Component
public
class
TokenService
{
@Value
(
"${project.jwt.secret}"
)
@Value
(
"${project.jwt.secret
:null
}"
)
private
String
secret
;
@Value
(
"${project.jwt.prefix}"
)
@Value
(
"${project.jwt.prefix
:null
}"
)
private
String
tokenPrefix
;
@Value
(
"${project.jwt.long-token-expire}"
)
@Value
(
"${project.jwt.long-token-expire
:0
}"
)
private
long
longTokenExpire
;
@Value
(
"${project.jwt.short-token-expire}"
)
@Value
(
"${project.jwt.short-token-expire
:0
}"
)
private
long
shortTokenExpire
;
@Value
(
"${project.jwt.subject-key}"
)
@Value
(
"${project.jwt.subject-key
:null
}"
)
private
String
subjectKey
;
@Value
(
"${project.jwt.long-token-key}"
)
@Value
(
"${project.jwt.long-token-key
:null
}"
)
private
String
longTokenKey
;
public
TokenVO
initToken
(
String
username
)
{
...
...
mobile-api/src/main/resources/application-dev.yaml
View file @
25e8d0f7
server
:
port
:
8080
spring
:
profiles
:
include
:
...
...
mobile-api/src/main/resources/application-local.yaml
View file @
25e8d0f7
server
:
port
:
8080
spring
:
profiles
:
include
:
...
...
mobile-api/src/main/resources/application-test.yaml
View file @
25e8d0f7
server
:
port
:
8080
spring
:
profiles
:
include
:
...
...
mobile-api/src/main/resources/application.yaml
View file @
25e8d0f7
server
:
port
:
8080
spring
:
application
:
name
:
"
antai-sport-http-server-mobile-api"
...
...
pom.xml
View file @
25e8d0f7
...
...
@@ -20,6 +20,7 @@
<module>
code-generator
</module>
<module>
common
</module>
<module>
constants
</module>
<module>
server-api
</module>
</modules>
...
...
server-api/pom.xml
0 → 100644
View file @
25e8d0f7
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<parent>
<artifactId>
antai-sport-http-server
</artifactId>
<groupId>
com.antai.sport.http.server
</groupId>
<version>
1.0-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
server-api
</artifactId>
<packaging>
jar
</packaging>
<properties>
<maven.compiler.source>
11
</maven.compiler.source>
<maven.compiler.target>
11
</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>
com.antai.sport.http.server
</groupId>
<artifactId>
common
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
com.easemob.im
</groupId>
<artifactId>
im-sdk-core
</artifactId>
<version>
0.5.2
</version>
</dependency>
</dependencies>
<build>
<finalName>
antai-sport-http-server-server-api
</finalName>
<plugins>
<plugin>
<artifactId>
maven-compiler-plugin
</artifactId>
<configuration>
<source>
${java.version}
</source>
<target>
${java.version}
</target>
<fork>
true
</fork>
<encoding>
${project.build.sourceEncoding}
</encoding>
</configuration>
</plugin>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-surefire-plugin
</artifactId>
<configuration>
<skipTests>
true
</skipTests>
</configuration>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
server-api/src/main/java/com/antai/sport/http/server/server/api/ServerApiApplication.java
0 → 100644
View file @
25e8d0f7
package
com
.
antai
.
sport
.
http
.
server
.
server
.
api
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.context.annotation.ComponentScan
;
import
springfox.documentation.oas.annotations.EnableOpenApi
;
@SpringBootApplication
@EnableOpenApi
@ComponentScan
(
value
=
"com.antai"
)
@MapperScan
(
"com.antai"
)
public
class
ServerApiApplication
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
ServerApiApplication
.
class
,
args
);
}
}
server-api/src/main/java/com/antai/sport/http/server/server/api/TestController.java
0 → 100644
View file @
25e8d0f7
package
com
.
antai
.
sport
.
http
.
server
.
server
.
api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.Map
;
@RestController
@Api
(
tags
=
{
"test"
})
public
class
TestController
{
@ApiOperation
(
value
=
"测试"
)
@GetMapping
(
"test"
)
public
Map
test
(){
return
Map
.
of
(
"test"
,
"hha"
);
}
}
server-api/src/main/resources/application-dev.yaml
0 → 100644
View file @
25e8d0f7
spring
:
profiles
:
include
:
-
common-db-dev
redis
:
database
:
0
host
:
127.0.0.1
port
:
6379
password
:
123456
swagger
:
enable
:
true
game-server-address
:
http://8.141.144.99:3333/close?MatchId=force
\ No newline at end of file
server-api/src/main/resources/application-local.yaml
0 → 100644
View file @
25e8d0f7
spring
:
profiles
:
include
:
-
common-db-local
redis
:
database
:
1
host
:
127.0.0.1
port
:
6379
swagger
:
enable
:
true
game-server-address
:
http://127.0.0.1:3333/close?MatchId=force
\ No newline at end of file
server-api/src/main/resources/application-prod.yaml
0 → 100644
View file @
25e8d0f7
spring
:
profiles
:
include
:
-
common-db-prod
redis
:
database
:
0
host
:
127.0.0.1
port
:
6379
password
:
ENC(yKZoKLWfAj6BRglq4C2HWWjsL64maeCm)
game-server-address
:
http://8.141.144.99:3333/close?MatchId=force
\ No newline at end of file
server-api/src/main/resources/application-test.yaml
0 → 100644
View file @
25e8d0f7
spring
:
profiles
:
include
:
-
common-db-test
redis
:
database
:
1
host
:
127.0.0.1
port
:
6379
password
:
ENC(yKZoKLWfAj6BRglq4C2HWWjsL64maeCm)
swagger
:
enable
:
true
game-server-address
:
http://8.141.144.99:3333/close?MatchId=force
\ No newline at end of file
server-api/src/main/resources/application.yaml
0 → 100644
View file @
25e8d0f7
server
:
port
:
8081
spring
:
application
:
name
:
"
antai-sport-http-server-server-api"
config
:
use-legacy-processing
:
true
profiles
:
active
:
dev
cache
:
redis
:
use-key-prefix
:
true
time-to-live
:
1d
expire
:
login-sms-captcha
:
600
keys
:
login-sms-captcha
:
login:sms-captcha
redis
:
timeout
:
10s
jedis
:
pool
:
max-idle
:
500
min-idle
:
50
max-wait
:
-1s
max-active
:
-1
jackson
:
date-format
:
com.antai.sport.http.server.common.jackson.StdDateFormat
time-zone
:
GMT+8
default-property-inclusion
:
always
project
:
header-token-key
:
Authorization
swagger
:
enable
:
false
projectName
:
服务端接口
header-token-key
:
${project.header-token-key}
api-version
:
1.0
author
:
liming
email
:
lmmax@126.com
scan-package
:
com.antai.sport.http.server.server.api
description
:
接口文档
service-website
:
https://www.antaikeji.top/
aliyun
:
access-key-id
:
LTAI4FivP3A9hfXzF5Z2KKNM
access-key-secret
:
W1erPY4SLOoPK0YwwptLZCSfZ61K4c
sms
:
sign
:
安泰实业
region-id
:
cn-qingdao
time-out
:
1000
template-code
:
login
:
SMS_136440120
#登录确认验证码
mybatis-plus
:
global-config
:
db-config
:
logic-delete-value
:
1
logic-not-delete-value
:
0
\ No newline at end of file
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