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
97fea6c1
Commit
97fea6c1
authored
Aug 18, 2021
by
liming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(初始化项目): init 合并多个commit
parent
781740e7
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
408 additions
and
2 deletions
+408
-2
pom.xml
game-api/pom.xml
+62
-0
GameApiApplication.java
.../antai/sport/http/server/game/api/GameApiApplication.java
+20
-0
TestController.java
...sport/http/server/game/api/controller/TestController.java
+32
-0
application-dev.yaml
game-api/src/main/resources/application-dev.yaml
+4
-0
application-prod.yaml
game-api/src/main/resources/application-prod.yaml
+4
-0
application.yaml
game-api/src/main/resources/application.yaml
+8
-0
pom.xml
pom.xml
+78
-2
pom.xml
profile/pom.xml
+32
-0
EncryptUtil.java
...java/com/antai/sport/http/server/profile/EncryptUtil.java
+50
-0
application-common-db-dev.yml
profile/src/main/resources/application-common-db-dev.yml
+14
-0
application-common-db-prod.yml
profile/src/main/resources/application-common-db-prod.yml
+10
-0
application-common-db.yaml
profile/src/main/resources/application-common-db.yaml
+19
-0
EncryptUtilTest.java
.../com/antai/sport/http/server/profile/EncryptUtilTest.java
+14
-0
pom.xml
repository/pom.xml
+33
-0
SysRole.java
.../java/com/antai/sport/http/server/repository/SysRole.java
+16
-0
SysRoleMapper.java
...com/antai/sport/http/server/repository/SysRoleMapper.java
+12
-0
No files found.
game-api/pom.xml
0 → 100644
View file @
97fea6c1
<?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>
game-api
</artifactId>
<packaging>
jar
</packaging>
<properties>
<maven.compiler.source>
11
</maven.compiler.source>
<maven.compiler.target>
11
</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
</dependency>
<dependency>
<groupId>
com.antai.sport.http.server
</groupId>
<artifactId>
profile
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
com.antai.sport.http.server
</groupId>
<artifactId>
repository
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
</dependencies>
<build>
<finalName>
antai-sport-http-server-game-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
game-api/src/main/java/com/antai/sport/http/server/game/api/GameApiApplication.java
0 → 100644
View file @
97fea6c1
package
com
.
antai
.
sport
.
http
.
server
.
game
.
api
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
/**
* @author 厉明
* @date 2021/8/18 11:35
* @email lmmax@126.com
* @description
*/
@SpringBootApplication
@MapperScan
(
"com.antai.**.repository"
)
public
class
GameApiApplication
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
GameApiApplication
.
class
,
args
);
}
}
game-api/src/main/java/com/antai/sport/http/server/game/api/controller/TestController.java
0 → 100644
View file @
97fea6c1
package
com
.
antai
.
sport
.
http
.
server
.
game
.
api
.
controller
;
import
com.antai.sport.http.server.repository.SysRole
;
import
com.antai.sport.http.server.repository.SysRoleMapper
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* @author 厉明
* @date 2021/8/18 11:40
* @email lmmax@126.com
* @description
*/
@RestController
public
class
TestController
{
@Resource
private
SysRoleMapper
sysRoleMapper
;
@GetMapping
(
"test"
)
public
Map
<
String
,
Object
>
test
()
{
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
List
<
SysRole
>
roleList
=
sysRoleMapper
.
selectList
(
null
);
result
.
put
(
"roleList"
,
roleList
);
return
result
;
}
}
game-api/src/main/resources/application-dev.yaml
0 → 100644
View file @
97fea6c1
spring
:
profiles
:
include
:
-
common-db-dev
\ No newline at end of file
game-api/src/main/resources/application-prod.yaml
0 → 100644
View file @
97fea6c1
spring
:
profiles
:
include
:
-
common-db-prod
\ No newline at end of file
game-api/src/main/resources/application.yaml
0 → 100644
View file @
97fea6c1
spring
:
application
:
name
:
"
antai-sport-http-server"
config
:
use-legacy-processing
:
true
profiles
:
active
:
dev
pom.xml
View file @
97fea6c1
...
@@ -3,14 +3,90 @@
...
@@ -3,14 +3,90 @@
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
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"
>
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
<parent>
<groupId>
org.example
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-parent
</artifactId>
<version>
2.4.2
</version>
<relativePath/>
<!-- lookup parent from repository -->
</parent>
<groupId>
com.antai.sport.http.server
</groupId>
<artifactId>
antai-sport-http-server
</artifactId>
<artifactId>
antai-sport-http-server
</artifactId>
<packaging>
pom
</packaging>
<version>
1.0-SNAPSHOT
</version>
<version>
1.0-SNAPSHOT
</version>
<modules>
<module>
repository
</module>
<module>
game-api
</module>
<module>
profile
</module>
</modules>
<properties>
<properties>
<java.version>
11
</java.version>
<spring-boot.version>
2.4.2
</spring-boot.version>
<mybatis-plus.version>
3.4.3.1
</mybatis-plus.version>
<jasypt.version>
3.0.3
</jasypt.version>
<yaml.version>
1.28
</yaml.version>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<maven.compiler.source>
11
</maven.compiler.source>
<maven.compiler.source>
11
</maven.compiler.source>
<maven.compiler.target>
11
</maven.compiler.target>
<maven.compiler.target>
11
</maven.compiler.target>
</properties>
</properties>
<dependencies>
<dependency>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
<scope>
provided
</scope>
<optional>
true
</optional>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
<scope>
test
</scope>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>
com.github.ulisesbocchio
</groupId>
<artifactId>
jasypt-spring-boot-starter
</artifactId>
<version>
${jasypt.version}
</version>
</dependency>
<dependency>
<groupId>
com.baomidou
</groupId>
<artifactId>
mybatis-plus-boot-starter
</artifactId>
<version>
${mybatis-plus.version}
</version>
</dependency>
</dependencies>
</dependencyManagement>
<repositories>
<repository>
<id>
public
</id>
<name>
aliyun-repository
</name>
<url>
https://maven.aliyun.com/repository/public/
</url>
<releases>
<enabled>
true
</enabled>
</releases>
<snapshots>
<enabled>
false
</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>
public
</id>
<name>
aliyun-plugin
</name>
<url>
https://maven.aliyun.com/repository/public/
</url>
<releases>
<enabled>
true
</enabled>
</releases>
<snapshots>
<enabled>
false
</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</project>
</project>
\ No newline at end of file
profile/pom.xml
0 → 100644
View file @
97fea6c1
<?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>
profile
</artifactId>
<packaging>
jar
</packaging>
<name>
profile
</name>
<properties>
<maven.compiler.source>
11
</maven.compiler.source>
<maven.compiler.target>
11
</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>
com.github.ulisesbocchio
</groupId>
<artifactId>
jasypt-spring-boot-starter
</artifactId>
</dependency>
<dependency>
<groupId>
org.yaml
</groupId>
<artifactId>
snakeyaml
</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
profile/src/main/java/com/antai/sport/http/server/profile/EncryptUtil.java
0 → 100644
View file @
97fea6c1
package
com
.
antai
.
sport
.
http
.
server
.
profile
;
import
org.jasypt.encryption.pbe.PooledPBEStringEncryptor
;
import
org.jasypt.encryption.pbe.config.SimpleStringPBEConfig
;
/**
* @author 厉明
* @date 2021/8/18 14:24
* @email lmmax@126.com
* @description
*/
public
class
EncryptUtil
{
/**
* Jasypt生成加密结果
*
* @param password 配置文件中设定的加密盐值
* @param value 加密值
* @return 加密结果
*/
public
static
String
encryptPwd
(
String
password
,
String
value
)
{
PooledPBEStringEncryptor
encryptor
=
new
PooledPBEStringEncryptor
();
encryptor
.
setConfig
(
initConfig
(
password
));
return
encryptor
.
encrypt
(
value
);
}
/**
* 解密
*
* @param password 配置文件中设定的加密盐值
* @param value 解密密文
* @return 解密结果
*/
public
static
String
decryptPwd
(
String
password
,
String
value
)
{
PooledPBEStringEncryptor
encryptor
=
new
PooledPBEStringEncryptor
();
encryptor
.
setConfig
(
initConfig
(
password
));
return
encryptor
.
decrypt
(
value
);
}
public
static
SimpleStringPBEConfig
initConfig
(
String
password
)
{
SimpleStringPBEConfig
config
=
new
SimpleStringPBEConfig
();
config
.
setPassword
(
password
);
config
.
setAlgorithm
(
"PBEWithMD5AndDES"
);
config
.
setKeyObtentionIterations
(
"1000"
);
config
.
setPoolSize
(
"1"
);
config
.
setProviderName
(
"SunJCE"
);
config
.
setSaltGeneratorClassName
(
"org.jasypt.salt.RandomSaltGenerator"
);
config
.
setStringOutputType
(
"base64"
);
return
config
;
}
}
profile/src/main/resources/application-common-db-dev.yml
0 → 100644
View file @
97fea6c1
spring
:
profiles
:
include
:
-
common-db
datasource
:
url
:
jdbc:mysql://39.106.215.44:3306/baobeilianmeng${project.mysql-url-params}
username
:
root
password
:
ENC(eeesjD8BM2hklNwdDv4FCDoaVZF9c8+2)
logging
:
level
:
root
:
info
com.antai.sport.http.server.repository
:
debug
profile/src/main/resources/application-common-db-prod.yml
0 → 100644
View file @
97fea6c1
spring
:
profiles
:
include
:
-
common-db
datasource
:
url
:
jdbc:mysql://39.106.215.44:3306/baobeilianmeng${project.mysql-url-params}
username
:
root
password
:
ENC(gIm3rgivj5IjdeWkJ/gsFAtIwg/+bX78)
profile/src/main/resources/application-common-db.yaml
0 → 100644
View file @
97fea6c1
project
:
mysql-url-params
:
?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowMultiQueries=true&allowPublicKeyRetrieval=true
spring
:
datasource
:
hikari
:
minimum-idle
:
5
maximum-pool-size
:
15
idle-timeout
:
30000
max-lifetime
:
120000
connection-timeout
:
30000
connection-test-query
:
SELECT 1
jasypt
:
encryptor
:
password
:
lmmax
algorithm
:
PBEWithMD5AndDES
iv-generator-classname
:
org.jasypt.iv.NoIvGenerator
profile/src/test/java/com/antai/sport/http/server/profile/EncryptUtilTest.java
0 → 100644
View file @
97fea6c1
package
com
.
antai
.
sport
.
http
.
server
.
profile
;
import
org.junit.jupiter.api.DisplayName
;
import
org.junit.jupiter.api.Test
;
@DisplayName
(
"EncryptUtilTest"
)
public
class
EncryptUtilTest
{
@Test
@DisplayName
(
"testEncrypt"
)
public
void
testEncrypt
()
{
System
.
out
.
println
(
EncryptUtil
.
encryptPwd
(
"123"
,
"123"
));
}
}
repository/pom.xml
0 → 100644
View file @
97fea6c1
<?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>
repository
</artifactId>
<packaging>
jar
</packaging>
<name>
repository
</name>
<properties>
<maven.compiler.source>
11
</maven.compiler.source>
<maven.compiler.target>
11
</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
<scope>
runtime
</scope>
</dependency>
<dependency>
<groupId>
com.baomidou
</groupId>
<artifactId>
mybatis-plus-boot-starter
</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
repository/src/main/java/com/antai/sport/http/server/repository/SysRole.java
0 → 100644
View file @
97fea6c1
package
com
.
antai
.
sport
.
http
.
server
.
repository
;
import
lombok.Data
;
/**
* @author 厉明
* @date 2021/8/18 15:02
* @email lmmax@126.com
* @description
*/
@Data
public
class
SysRole
{
private
Long
id
;
private
String
code
;
private
String
name
;
}
repository/src/main/java/com/antai/sport/http/server/repository/SysRoleMapper.java
0 → 100644
View file @
97fea6c1
package
com
.
antai
.
sport
.
http
.
server
.
repository
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* @author 厉明
* @date 2021/8/18 15:09
* @email lmmax@126.com
* @description
*/
public
interface
SysRoleMapper
extends
BaseMapper
<
SysRole
>
{
}
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