Skip to content

Commit b051a7c

Browse files
committed
升级 vue-admin-template 版本 4.4.0
重构 spring boot 所有代码。使用 mybatis-plus 做持久化! 新增 操作日志 和 登录日志 功能!
1 parent ae09132 commit b051a7c

File tree

310 files changed

+26310
-19156
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

310 files changed

+26310
-19156
lines changed

spring-restful-api/.gitignore

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
HELP.md
2+
target/
3+
!.mvn/wrapper/maven-wrapper.jar
4+
!**/src/main/**/target/
5+
!**/src/test/**/target/
6+
7+
### STS ###
8+
.apt_generated
9+
.classpath
10+
.factorypath
11+
.project
12+
.settings
13+
.springBeans
14+
.sts4-cache
15+
16+
### IntelliJ IDEA ###
17+
.idea
18+
*.iws
19+
*.iml
20+
*.ipr
21+
22+
### NetBeans ###
23+
/nbproject/private/
24+
/nbbuild/
25+
/dist/
26+
/nbdist/
27+
/.nb-gradle/
28+
build/
29+
!**/src/main/**/build/
30+
!**/src/test/**/build/
31+
32+
### VS Code ###
33+
.vscode/

spring-restful-api/.mvn/wrapper/MavenWrapperDownloader.java

Lines changed: 0 additions & 115 deletions
This file was deleted.
7.83 KB
Binary file not shown.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.2/apache-maven-3.6.2-bin.zip
2-
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar
1+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.4/apache-maven-3.8.4-bin.zip
2+
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar

spring-restful-api/Dockerfile

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
FROM openjdk:8-jre
1+
FROM eclipse-temurin:11.0.13_8-jre
22

33
MAINTAINER Wang Chen Chen<932560435@qq.com>
44

5-
ENV VERSION 1.0
5+
ENV VERSION 1.1
66
# 挂载容器目录
77
# tmp: 临时文件目录,内嵌tomcat启动时,用到
88
# logs: spring-boot 日志输出的目录
@@ -15,15 +15,20 @@ ARG JAR_FILE
1515
# 复制打包 完成后的jar文件,名字修改成 app.jar
1616
COPY ${JAR_FILE} app.jar
1717

18-
# 设置时区为上海
19-
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
20-
RUN echo 'Asia/Shanghai' >/etc/timezone
21-
2218
# 设置编码
2319
ENV LANG C.UTF-8
2420

21+
# 设置环境变量
22+
ENV CONSUL_SERVER_PORT=8500
23+
24+
# JVM参数
25+
ENV JVM_OPTS="-server -Xms2048M -Xmx2048M -XX:+DisableExplicitGC -XX:+HeapDumpOnOutOfMemoryError"
26+
27+
# spring 启动环境
28+
ENV SPRING_ENV="prod"
29+
2530
# 服务暴露端口PORT
26-
EXPOSE 8090
31+
EXPOSE 18888
2732

2833
# 启动 Spring Boot App 命令
29-
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","app.jar"]
34+
ENTRYPOINT java ${JVM_OPTS} -Dfile.encoding=UTF-8 -Duser.timezone=Asia/Shanghai -Djava.security.egd=file:/dev/./urandom -jar /app.jar --spring.profiles.active=${SPRING_ENV}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"dev": {
3+
"baseUrl": "http://localhost:18888"
4+
},
5+
"prod": {
6+
"baseUrl": "https://api.mhtled.com"
7+
}
8+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
### 图片上传
2+
POST {{baseUrl}}/upload/image
3+
Authorization: Bearer {{tokenValue}}
4+
Content-Type: multipart/form-data; boundary=WebAppBoundary
5+
6+
--WebAppBoundary
7+
Content-Disposition: form-data; name="file"; filename="tR9669GlNMU-343X.bin"
8+
Content-Type: multipart/form-data
9+
10+
< C:\\Users\\demo\\Desktop\\地图和头像\\tR9669GlNMU-343X.bin
11+
--WebAppBoundary--
12+
13+
14+
15+
16+
### 头像上传
17+
POST {{baseUrl}}/upload/avatar
18+
Authorization: Bearer {{tokenValue}}
19+
Content-Type: multipart/form-data; boundary=WebAppBoundary
20+
21+
--WebAppBoundary
22+
Content-Disposition: form-data; name="file"; filename="avatar-4.jpg"
23+
Content-Type: multipart/form-data
24+
25+
< C:\\Users\\demo\\Desktop\\地图和头像\\avatar-4.jpg
26+
--WebAppBoundary--
27+
28+
29+
30+
31+
### 删除图片
32+
DELETE {{baseUrl}}/upload/delete?url=https://images.xaaef.com/20210728105923.png
33+
Authorization: Bearer {{tokenValue}}
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
## 安全认证
2+
3+
## 验证码一定要在浏览器获取 codeKey 要是随机数。在登录的时候会用到 codeKey
4+
GET {{baseUrl}}/auth/captcha/codes/5jXzuwcoUzbtnHNh
5+
6+
### 密码模式登录
7+
POST {{baseUrl}}/auth/login
8+
Content-Type: application/json
9+
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:86.0) Gecko/20100101 Firefox/86.0
10+
11+
{
12+
"username": "admin",
13+
"password": "admin",
14+
"codeKey": "5jXzuwcoUzbtnHNh",
15+
"codeText": "9jps"
16+
}
17+
18+
> {%
19+
client.global.set("tokenValue", response.body.data.access_token);
20+
client.global.set("refreshToken", response.body.data.refresh_token);
21+
%}
22+
23+
### 退出登录
24+
POST {{baseUrl}}/auth/logout
25+
Content-Type: application/json
26+
Authorization: Bearer {{tokenValue}}
27+
28+
### 刷新token
29+
GET {{baseUrl}}/auth/refresh
30+
Content-Type: application/json
31+
Authorization: Bearer {{tokenValue}}
32+
33+
### 获取登录的用户信息
34+
GET {{baseUrl}}/user/info
35+
Content-Type: application/json
36+
Authorization: Bearer {{tokenValue}}
37+
38+
39+
40+
### 首页 测试 @PreAuthorize("hasAuthority('home:get')")
41+
GET {{baseUrl}}/home
42+
Content-Type: application/json
43+
Authorization: Bearer {{tokenValue}}
44+
45+
46+
### 首页 测试 @PreAuthorize("hasAuthority('index:get')")
47+
GET {{baseUrl}}/index
48+
Content-Type: application/json
49+
Authorization: Bearer {{tokenValue}}
50+
51+
52+
53+

spring-restful-api/mvnw

Lines changed: 14 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)