From 26719f45677bed386db1dc8ad35d32941305c116 Mon Sep 17 00:00:00 2001 From: WenG <450292408@qq.com> Date: Sun, 15 Aug 2021 23:01:51 +0800 Subject: [PATCH] fc --- .gitignore | 36 ++++++ Dockerfile | 4 + pom.xml | 106 +++++++++++++++++ .../WgGatewayManageApplication.java | 13 +++ src/main/resources/application-test.yml | 108 ++++++++++++++++++ src/main/resources/mybatis/mybatis-config.xml | 14 +++ src/main/resources/static/error/403.html | 28 +++++ src/main/resources/static/error/404.html | 28 +++++ src/main/resources/static/error/500.html | 28 +++++ .../WgGatewayManageApplicationTests.java | 13 +++ 10 files changed, 378 insertions(+) create mode 100644 .gitignore create mode 100644 Dockerfile create mode 100644 pom.xml create mode 100644 src/main/java/ink/wgink/gatewaymanage/WgGatewayManageApplication.java create mode 100644 src/main/resources/application-test.yml create mode 100644 src/main/resources/mybatis/mybatis-config.xml create mode 100644 src/main/resources/static/error/403.html create mode 100644 src/main/resources/static/error/404.html create mode 100644 src/main/resources/static/error/500.html create mode 100644 src/test/java/ink/wgink/wggatewaymanage/WgGatewayManageApplicationTests.java diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..de3653d --- /dev/null +++ b/.gitignore @@ -0,0 +1,36 @@ +HELP.md +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ +.mvn +mvnw +mvnw.cmd + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..33b85fd --- /dev/null +++ b/Dockerfile @@ -0,0 +1,4 @@ +FROM openjdk:8u292-jre-buster +ARG JAR_FILE=/target/*.jar +COPY ${JAR_FILE} wg-gateway-manage.jar +ENTRYPOINT ["java","-jar","-Dspring.profiles.active=prod","/wg-gateway-manage.jar"] \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..cd78f91 --- /dev/null +++ b/pom.xml @@ -0,0 +1,106 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 2.4.2 + + + ink.wgink + wg-gateway-manage + 0.0.1-SNAPSHOT + wg-gateway-manage + 网关管理系统 + + + 1.8 + 2.1.4 + 8.0.22 + 2.3.28 + 1.1.9 + + + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-thymeleaf + + + org.springframework.boot + spring-boot-starter-freemarker + + + mysql + mysql-connector-java + ${mysql.version} + runtime + + + + org.springframework.boot + spring-boot-starter-test + test + + + org.mybatis.spring.boot + mybatis-spring-boot-starter + ${spring-mybatis.version} + + + com.alibaba + druid-spring-boot-starter + ${druid.version} + + + junit + junit + test + + + org.projectlombok + lombok + 1.18.16 + provided + + + + + ink.wgink + service-group + 1.0-SNAPSHOT + + + ink.wgink + service-position + 1.0-SNAPSHOT + + + ink.wgink + service-role + 1.0-SNAPSHOT + + + ink.wgink + basic-app + 1.0-SNAPSHOT + + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + diff --git a/src/main/java/ink/wgink/gatewaymanage/WgGatewayManageApplication.java b/src/main/java/ink/wgink/gatewaymanage/WgGatewayManageApplication.java new file mode 100644 index 0000000..5932676 --- /dev/null +++ b/src/main/java/ink/wgink/gatewaymanage/WgGatewayManageApplication.java @@ -0,0 +1,13 @@ +package ink.wgink.gatewaymanage; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class WgGatewayManageApplication { + + public static void main(String[] args) { + SpringApplication.run(WgGatewayManageApplication.class, args); + } + +} diff --git a/src/main/resources/application-test.yml b/src/main/resources/application-test.yml new file mode 100644 index 0000000..f00d462 --- /dev/null +++ b/src/main/resources/application-test.yml @@ -0,0 +1,108 @@ +server: + port: 7009 + url: http://127.0.0.1:7009/gateway-manage + system-title: 网关管理系统 + system-sub-title: 网关管理系统 +# default-index-page: + default-home-page: route/system/default + servlet: + context-path: /study + +spring: + login-url: /oauth/login + login-failure: /oauth/login?error + login-process: /userlogin + assets-matchers: /assets/** + thymeleaf: + prefix: classpath:/templates/ + suffix: .html + mode: HTML5 + encoding: UTF-8 + cache: false + main: + allow-bean-definition-overriding: true + servlet: + multipart: + max-file-size: 1GB + max-request-size: 1GB + datasource: + druid: + url: jdbc:mysql://127.0.0.1:3306/db_gateway_manage?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false&serverTimezone=UTC + db-type: mysql + driver-class-name: com.mysql.cj.jdbc.Driver + username: root + password: root + initial-size: 2 + min-idle: 2 + max-active: 5 + max-wait: 60000 + time-between-eviction-runs-millis: 60000 + min-evictable-idle-time-millis: 300000 + validation-query: SELECT 1 FROM DUAL + test-while-idle: true + test-on-borrow: false + test-on-return: false + pool-prepared-statements: true + max-pool-prepared-statement-per-connection-size: 10 + filter: + commons-log: + connection-logger-name: stat,wall,log4j + stat: + log-slow-sql: true + slow-sql-millis: 2000 + connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 + use-global-data-source-stat: true + +# 数据库 +mybatis: + config-location: classpath:mybatis/mybatis-config.xml + mapper-locations: classpath*:mybatis/mapper/**/*.xml + +# 文档 +swagger: + base-package-list: ink.wgink,com.cm + +# 访问控制 +access-control: + role-permission: false + +# 文件 +file: + # 文件的保存路径 + upload-path: /Users/wanggeng/Desktop/UploadFiles/ + # 图片类型 + image-types: png,jpg,jpeg,gif,blob + # 视频类型 + video-types: mp4,rmvb + # 音频类型 + audio-types: mp3,wmv,amr + # 文件类型 + file-types: doc,docx,xls,xlsx,ppt,pptx,txt,zip,rar,apk,pdf + # 同时上传最大支持数 + max-file-count: 6 + # 图片输出压缩质量,大于0,默认0.4 + image-output-quality: 0.4 + # 媒体最大时长(单位:秒) + media-max-duration: + # 后台 + backend: + video: 0 + audio: 0 + # 微信 + wechat: + video: 0 + audio: 0 + # app + app: + video: 0 + audio: 0 + +# 日志 +logging: + file: + name: /projects/logs/study/systemstudy-logs.log + level: + root: error + org.springframework.boot.autoconfigure.security.servlet: debug + ink.wgink: debug + com.cm: debug \ No newline at end of file diff --git a/src/main/resources/mybatis/mybatis-config.xml b/src/main/resources/mybatis/mybatis-config.xml new file mode 100644 index 0000000..5e7e86d --- /dev/null +++ b/src/main/resources/mybatis/mybatis-config.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/static/error/403.html b/src/main/resources/static/error/403.html new file mode 100644 index 0000000..c30f8bd --- /dev/null +++ b/src/main/resources/static/error/403.html @@ -0,0 +1,28 @@ + + + + + + + + + + + + +
+
+ +
+ 权限不足 +

+ 4 + 0 + 3 +

+
+
+
+ + + diff --git a/src/main/resources/static/error/404.html b/src/main/resources/static/error/404.html new file mode 100644 index 0000000..175437c --- /dev/null +++ b/src/main/resources/static/error/404.html @@ -0,0 +1,28 @@ + + + + + + + + + + + + +
+
+ +
+ 无法访问 +

+ 4 + 0 + 4 +

+
+
+
+ + + diff --git a/src/main/resources/static/error/500.html b/src/main/resources/static/error/500.html new file mode 100644 index 0000000..849722d --- /dev/null +++ b/src/main/resources/static/error/500.html @@ -0,0 +1,28 @@ + + + + + + + + + + + + +
+
+ +
+ 系统错误 +

+ 4 + 0 + 5 +

+
+
+
+ + + diff --git a/src/test/java/ink/wgink/wggatewaymanage/WgGatewayManageApplicationTests.java b/src/test/java/ink/wgink/wggatewaymanage/WgGatewayManageApplicationTests.java new file mode 100644 index 0000000..44105c9 --- /dev/null +++ b/src/test/java/ink/wgink/wggatewaymanage/WgGatewayManageApplicationTests.java @@ -0,0 +1,13 @@ +package ink.wgink.wggatewaymanage; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class WgGatewayManageApplicationTests { + + @Test + void contextLoads() { + } + +}