commit b47601fa4f9eb131c137ac07dc82e600adf2b719
Author: eroter <331864945@qq.com>
Date: Tue Sep 7 09:57:42 2021 +0800
RY-Base
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 00000000..8cfd3709
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,21 @@
+# http://editorconfig.org
+root = true
+
+# 空格替代Tab缩进在各种编辑工具下效果一致
+[*]
+indent_style = space
+indent_size = 4
+charset = utf-8
+end_of_line = lf
+trim_trailing_whitespace = true
+insert_final_newline = true
+
+[*.java]
+indent_style = tab
+
+[*.{json,yml}]
+indent_size = 2
+
+[*.md]
+insert_final_newline = false
+trim_trailing_whitespace = false
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000..2c0e049a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,44 @@
+######################################################################
+# Build Tools
+
+.gradle
+/build/
+!gradle/wrapper/gradle-wrapper.jar
+
+target/
+!.mvn/wrapper/maven-wrapper.jar
+
+######################################################################
+# IDE
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+nbproject/private/
+build/*
+nbbuild/
+dist/
+nbdist/
+.nb-gradle/
+
+######################################################################
+# Others
+*.log
+*.xml.versionsBackup
+*.swp
+
+!*/build/*.java
+!*/build/*.html
+!*/build/*.xml
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 00000000..32b30711
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,20 @@
+The MIT License (MIT)
+
+Copyright (c) 2019 RuoYi-Vue-Plus
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/README.md b/README.md
new file mode 100644
index 00000000..778b901f
--- /dev/null
+++ b/README.md
@@ -0,0 +1,182 @@
+## 平台简介
+[![码云Gitee](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/badge/star.svg?theme=blue)](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus)
+[![GitHub](https://img.shields.io/github/stars/JavaLionLi/RuoYi-Vue-Plus.svg?style=social&label=Stars)](https://github.com/JavaLionLi/RuoYi-Vue-Plus)
+[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/blob/master/LICENSE)
+[![使用IntelliJ IDEA开发维护](https://img.shields.io/badge/IntelliJ%20IDEA-提供支持-blue.svg)](https://www.jetbrains.com/?from=RuoYi-Vue-Plus)
+
+[![RuoYi-Vue-Plus](https://img.shields.io/badge/RuoYi_Vue_Plus-3.0.0-success.svg)](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus)
+[![Spring Boot](https://img.shields.io/badge/Spring%20Boot-2.5-blue.svg)]()
+[![JDK-8+](https://img.shields.io/badge/JDK-8+-green.svg)]()
+[![JDK-11](https://img.shields.io/badge/JDK-11-green.svg)]()
+
+RuoYi-Vue-Plus 是基于 RuoYi-Vue 针对 `分布式集群` 场景升级 定期与 RuoYi-Vue 同步
+
+集成 Lock4j dynamic-datasource OSS存储 等分布式场景解决方案
+
+集成 Mybatis-Plus Lombok Hutool 等便捷开发工具 适配重写相关业务 便于开发
+
+* 前端开发框架 Vue、Element UI
+* 后端开发框架 Spring Boot、Redis
+* 容器框架 Undertow 基于 Netty 的高性能容器
+* 权限认证框架 Spring Security、Jwt,支持多终端认证系统
+* 关系数据库 MySQL 适配 8.X
+* 缓存数据库 Redis 适配 6.X
+* 数据库框架 Mybatis-Plus 快速 CRUD 增加开发效率 插件化支持各类需求
+* 数据库框架 多数据源框架 dynamic-datasource 支持主从与多种类数据库异构
+* 数据库框架 Redis客户端 采用 Redisson 性能更强
+* 数据库框架 性能分析插件 p6spy 更强劲的 SQL 分析
+* 序列化框架 统一使用 jackson 高效可靠
+* 网络框架 Feign、OkHttp3 接口化管理 HTTP 请求
+* 分布式锁 Lock4j 注解锁、工具锁 多种多样
+* 文件存储 OSS 对象存储模块 支持(Minio、七牛、阿里、腾讯)
+* 监控框架 spring-boot-admin 全方位服务监控
+* 校验框架 validation 增强接口安全性 严谨性
+* Excel框架 Alibaba EasyExcel 性能优异 扩展性强
+* 文档框架 knife4j 美化接口文档
+* 工具类框架 Hutool、Lombok 减少代码冗余 增加安全性
+* 代码生成器 一键生成前后端代码
+* 部署方式 Docker 容器编排 一键部署业务集群
+* 国际化 Spring 标准国际化方解决方案
+
+## 参考文档
+
+使用框架前请仔细阅读文档重点注意事项
+
+>[初始化项目 必看](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/关于初始化项目?sort_id=4164117)
+>>[https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/关于初始化项目?sort_id=4164117](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/关于初始化项目?sort_id=4164117)
+>
+>[部署项目 必看](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/关于应用部署?sort_id=4219382)
+>>[https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/关于应用部署?sort_id=4219382](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/关于应用部署?sort_id=4219382)
+>
+>[参考文档 Wiki](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/pages)
+>>[https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/pages](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/pages)
+
+## 软件架构图
+
+![Plus部署架构图](https://images.gitee.com/uploads/images/2021/0729/112230_4295e5ce_1766278.png "Plus部署架构图.png")
+
+## 贡献代码
+
+欢迎各路英雄豪杰 `PR` 代码 请提交到 `dev` 开发分支 统一测试发版
+
+框架定位为 `通用后台管理系统(分布式集群强化)` 原则上不接受业务 `PR`
+
+## 修改RuoYi功能
+### 依赖改动
+
+* ORM框架 使用 Mybatis-Plus 简化CRUD (不支持主子表)
+* Bean简化 使用 Lombok 简化 get set toString 等等
+* 容器改动 Tomcat 改为 并发性能更好的 undertow
+* 移除 pagehelper 改为 Mybatis-Plus 分页
+* 集成 p6spy 更强劲的 SQL 分析
+* 升级 swagger 为 knife4j
+* 集成 Hutool 5.X 并重写RuoYi部分功能
+* 集成 Feign 接口化管理 Http 请求(如三方请求 支付,短信,推送等)
+* 移除 自带服务监控 改为 spring-boot-admin 全方位监控
+* 增加 demo 模块示例(给不会增加模块的小伙伴做参考)
+* 增加 redisson 高性能 Redis 客户端
+* 移除 fastjson 统一使用 jackson 序列化
+* 集成 dynamic-datasource 多数据源(默认支持MySQL,其他种类需自行适配)
+* 集成 Lock4j 实现分布式 注解锁、工具锁 多种多样
+* 增加 Docker 容器编排 打包插件与部署脚本
+* 移除 通用上传下载 改为 OSS对象存储 支持(Minio、七牛、阿里、腾讯)
+* 移除 RuoYi自带 Excel 工具 改为 EasyExcel 工具
+
+### 代码改动
+
+* 所有原生功能使用 Mybatis-Plus 与 Lombok 重写
+* 增加 IServicePlus 与 BaseMapperPlus 可自定义通用方法
+* 代码生成模板 改为适配 Mybatis-Plus 的代码
+* 代码生成模板 根据 Alibaba 代码规约 拆分出 VO、BO 等领域对象
+* 代码生成模板 增加 文档注解 与 校验注解 简化通用操作
+* 项目修改为 maven多环境配置
+* 项目配置修改为 application.yml 统一管理
+* 数据权限修改为 适配支持单表、多表
+* 使用 redisson 实现 spring-cache 整合
+* 增加 mybatis-plus 二级缓存 redis 存储
+
+### 其他
+
+* 同步升级 RuoYi-Vue
+* GitHub 地址 [RuoYi-Vue-Plus-github](https://github.com/JavaLionLi/RuoYi-Vue-Plus)
+* 单模块 fast 分支 [RuoYi-Vue-Plus-fast](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/tree/fast/)
+* Oracle 模块 oracle 分支 [RuoYi-Vue-Plus-oracle](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/tree/oracle/)
+
+## 加群与捐献
+>[加群与捐献](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/加群与捐献?sort_id=4104598)
+>>[https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/加群与捐献?sort_id=4104598](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/加群与捐献?sort_id=4104598)
+
+## 捐献作者
+作者为兼职做开源,平时还需要工作,如果帮到了您可以请作者吃个盒饭
+
+
+
+## 内置功能
+
+1. 用户管理:用户是系统操作者,该功能主要完成系统用户配置。
+2. 部门管理:配置系统组织机构(公司、部门、小组),树结构展现支持数据权限。
+3. 岗位管理:配置系统用户所属担任职务。
+4. 菜单管理:配置系统菜单,操作权限,按钮权限标识等。
+5. 角色管理:角色菜单权限分配、设置角色按机构进行数据范围权限划分。
+6. 字典管理:对系统中经常使用的一些较为固定的数据进行维护。
+7. 参数管理:对系统动态配置常用参数。
+8. 通知公告:系统通知公告信息发布维护。
+9. 操作日志:系统正常操作日志记录和查询;系统异常信息日志记录和查询。
+10. 登录日志:系统登录日志记录查询包含登录异常。
+11. 在线用户:当前系统中活跃用户状态监控。
+12. 定时任务:在线(添加、修改、删除)任务调度包含执行结果日志。
+13. 代码生成:前后端代码的生成(java、html、xml、sql)支持CRUD下载 。
+14. 系统接口:根据业务代码自动生成相关的api接口文档。
+15. 服务监控:监视当前系统CPU、内存、磁盘、堆栈等相关信息。
+16. 缓存监控:对系统的缓存信息查询,命令统计等。
+17. 在线构建器:拖动表单元素生成相应的HTML代码。
+18. 连接池监视:监视当前系统数据库连接池状态,可进行分析SQL找出系统性能瓶颈。
+
+## 演示图例
+
+
+
+## 在线体验
+
+- admin/admin123
+- 陆陆续续收到一些打赏,为了更好的体验已用于演示服务器升级。谢谢各位小伙伴。
+
+演示地址:http://vue.ruoyi.vip
+文档地址:http://doc.ruoyi.vip
diff --git a/docker/deploy.sh b/docker/deploy.sh
new file mode 100644
index 00000000..79fb9ae5
--- /dev/null
+++ b/docker/deploy.sh
@@ -0,0 +1,99 @@
+#!/bin/bash
+
+#使用说明,用来提示输入参数
+usage() {
+ echo "Usage: sh 执行脚本.sh [port|mount|monitor|base|start|stop|stopall|rm|rmiNoneTag]"
+ exit 1
+}
+
+#开启所需端口(生产环境不推荐开启)
+port(){
+ # mysql 端口
+ firewall-cmd --add-port=3306/tcp --permanent
+ # redis 端口
+ firewall-cmd --add-port=6379/tcp --permanent
+ # minio api 端口
+ firewall-cmd --add-port=9000/tcp --permanent
+ # minio 控制台端口
+ firewall-cmd --add-port=9001/tcp --permanent
+ # 重启防火墙
+ service firewalld restart
+}
+
+##放置挂载文件
+mount(){
+ #挂载配置文件
+ if test ! -f "/docker/nginx/conf/nginx.conf" ;then
+ mkdir -p /docker/nginx/conf
+ cp nginx/nginx.conf /docker/nginx/conf/nginx.conf
+ fi
+}
+
+#启动基础模块
+base(){
+ docker-compose up -d mysql nginx-web redis minio
+}
+
+#启动基础模块
+monitor(){
+ docker-compose up -d ruoyi-monitor-admin
+}
+
+#启动程序模块
+start(){
+ docker-compose up -d ruoyi-server1 ruoyi-server2
+}
+
+#停止程序模块
+stop(){
+ docker-compose stop ruoyi-server1 ruoyi-server2
+}
+
+#关闭所有模块
+stopall(){
+ docker-compose stop
+}
+
+#删除所有模块
+rm(){
+ docker-compose rm
+}
+
+#删除Tag为空的镜像
+rmiNoneTag(){
+ docker images|grep none|awk '{print $3}'|xargs docker rmi -f
+}
+
+#根据输入参数,选择执行对应方法,不输入则执行使用说明
+case "$1" in
+"port")
+ port
+;;
+"mount")
+ mount
+;;
+"base")
+ base
+;;
+"monitor")
+ monitor
+;;
+"start")
+ start
+;;
+"stop")
+ stop
+;;
+"stopall")
+ stopall
+;;
+"rm")
+ rm
+;;
+"rmiNoneTag")
+ rmiNoneTag
+;;
+*)
+ usage
+;;
+esac
diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml
new file mode 100644
index 00000000..228ddbf2
--- /dev/null
+++ b/docker/docker-compose.yml
@@ -0,0 +1,151 @@
+version: '3'
+
+services:
+ mysql:
+ image: mysql:8.0.24
+ container_name: mysql
+ environment:
+ # 时区上海
+ TZ: Asia/Shanghai
+ # root 密码
+ MYSQL_ROOT_PASSWORD: root
+ # 初始化数据库(后续的初始化sql会在这个库执行)
+ MYSQL_DATABASE: ry-vue
+ ports:
+ - 3306:3306
+ volumes:
+ # 数据挂载
+ - /docker/mysql/data/:/var/lib/mysql/
+ # 配置挂载
+ - /docker/mysql/conf/:/etc/mysql/conf.d/
+ command:
+ # 将mysql8.0默认密码策略 修改为 原先 策略 (mysql8.0对其默认策略做了更改 会导致密码无法匹配)
+ --default-authentication-plugin=mysql_native_password
+ --character-set-server=utf8mb4
+ --collation-server=utf8mb4_general_ci
+ --explicit_defaults_for_timestamp=true
+ --lower_case_table_names=1
+ privileged: true
+ restart: always
+ networks:
+ ruoyi_net:
+ ipv4_address: 172.30.0.36
+
+ nginx-web:
+ # 如果需要指定版本 就把 latest 换成版本号
+ image: nginx:latest
+ container_name: nginx-web
+ environment:
+ # 时区上海
+ TZ: Asia/Shanghai
+ ports:
+ - 80:80
+ - 443:443
+ volumes:
+ # 证书映射
+ - /docker/nginx/cert:/etc/nginx/cert
+ # 配置文件映射
+ - /docker/nginx/conf/nginx.conf:/etc/nginx/nginx.conf
+ # 页面目录
+ - /docker/nginx/html:/usr/share/nginx/html
+ # 日志目录
+ - /docker/nginx/log:/var/log/nginx
+ privileged: true
+ restart: always
+ networks:
+ - ruoyi_net
+
+ redis:
+ image: redis:6.2.1
+ container_name: redis
+ ports:
+ - 6379:6379
+ environment:
+ # 时区上海
+ TZ: Asia/Shanghai
+ volumes:
+ # 配置文件
+ - /docker/redis/conf/redis.conf:/redis.conf:rw
+ # 数据文件
+ - /docker/redis/data:/data:rw
+ command: "redis-server --appendonly yes"
+ privileged: true
+ restart: always
+ networks:
+ ruoyi_net:
+ ipv4_address: 172.30.0.48
+
+ minio:
+ image: minio/minio:RELEASE.2021-07-08T01-15-01Z
+ hostname: "minio"
+ ports:
+ # api 端口
+ - 9000:9000
+ # 控制台端口
+ - 9001:9001
+ environment:
+ # 时区上海
+ TZ: Asia/Shanghai
+ # 管理后台用户名
+ MINIO_ACCESS_KEY: ruoyi
+ # 管理后台密码,最小8个字符
+ MINIO_SECRET_KEY: ruoyi123
+ volumes:
+ # 映射当前目录下的data目录至容器内/data目录
+ - /docker/minio/data:/data
+ # 映射配置目录
+ - /docker/minio/config:/root/.minio/
+ command: server --console-address ':9001' /data # 指定容器中的目录 /data
+ privileged: true
+ restart: always
+ networks:
+ ruoyi_net:
+ ipv4_address: 172.30.0.54
+
+ ruoyi-server1:
+ image: "ruoyi/ruoyi-server:3.0.0"
+ environment:
+ # 时区上海
+ TZ: Asia/Shanghai
+ volumes:
+ # 配置文件
+ - /docker/server1/logs/:/ruoyi/server/logs/
+ - /docker/ruoyi/uploadPath/:/ruoyi/server/ruoyi/uploadPath/
+ privileged: true
+ restart: always
+ networks:
+ ruoyi_net:
+ ipv4_address: 172.30.0.60
+
+ ruoyi-server2:
+ image: "ruoyi/ruoyi-server:3.0.0"
+ environment:
+ # 时区上海
+ TZ: Asia/Shanghai
+ volumes:
+ # 配置文件
+ - /docker/server2/logs/:/ruoyi/server/logs/
+ - /docker/ruoyi/uploadPath/:/ruoyi/server/ruoyi/uploadPath/
+ privileged: true
+ restart: always
+ networks:
+ ruoyi_net:
+ ipv4_address: 172.30.0.61
+
+ ruoyi-monitor-admin:
+ image: "ruoyi/ruoyi-monitor-admin:3.0.0"
+ environment:
+ # 时区上海
+ TZ: Asia/Shanghai
+ privileged: true
+ restart: always
+ networks:
+ ruoyi_net:
+ ipv4_address: 172.30.0.90
+
+networks:
+ ruoyi_net:
+ driver: bridge
+ ipam:
+ config:
+ - subnet: 172.30.0.0/16
diff --git a/docker/nginx/nginx.conf b/docker/nginx/nginx.conf
new file mode 100644
index 00000000..66ac29e3
--- /dev/null
+++ b/docker/nginx/nginx.conf
@@ -0,0 +1,77 @@
+worker_processes 1;
+
+error_log /var/log/nginx/error.log warn;
+pid /var/run/nginx.pid;
+
+events {
+ worker_connections 1024;
+}
+
+http {
+ include mime.types;
+ default_type application/octet-stream;
+ sendfile on;
+ keepalive_timeout 65;
+ # 限制body大小
+ client_max_body_size 100m;
+
+ log_format main '$remote_addr - $remote_user [$time_local] "$request" '
+ '$status $body_bytes_sent "$http_referer" '
+ '"$http_user_agent" "$http_x_forwarded_for"';
+
+ access_log /var/log/nginx/access.log main;
+
+ upstream server {
+ server 172.30.0.60:8080;
+ server 172.30.0.61:8080;
+ }
+
+ upstream monitor-admin {
+ server 172.30.0.90:9090;
+ }
+
+ server {
+ listen 80;
+ server_name localhost;
+
+ # https配置参考 start
+ #listen 443 ssl;
+
+ # 证书直接存放 /docker/nginx/cert/ 目录下即可 更改证书名称即可 无需更改证书路径
+ #ssl on;
+ #ssl_certificate /etc/nginx/cert/xxx.local.crt; # /etc/nginx/cert/ 为docker映射路径 不允许更改
+ #ssl_certificate_key /etc/nginx/cert/xxx.local.key; # /etc/nginx/cert/ 为docker映射路径 不允许更改
+ #ssl_session_timeout 5m;
+ #ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
+ #ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
+ #ssl_prefer_server_ciphers on;
+ # https配置参考 end
+
+ location / {
+ root /usr/share/nginx/html;
+ try_files $uri $uri/ /index.html;
+ index index.html index.htm;
+ }
+
+ location /prod-api/ {
+ proxy_set_header Host $http_host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header REMOTE-HOST $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_pass http://server/;
+ }
+
+ location /admin/ {
+ proxy_set_header Host $http_host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header REMOTE-HOST $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_pass http://monitor-admin/admin/;
+ }
+
+ error_page 500 502 503 504 /50x.html;
+ location = /50x.html {
+ root html;
+ }
+ }
+}
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 00000000..cdd1f9e4
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,365 @@
+
+
+ 4.0.0
+
+ com.ruoyi
+ ruoyi-vue-plus
+ 3.0.0
+
+ RuoYi-Vue-Plus
+ https://gitee.com/JavaLionLi/RuoYi-Vue-Plus
+ RuoYi-Vue-Plus后台管理系统
+
+
+ 3.0.0
+ 2.5.3
+ UTF-8
+ UTF-8
+ 1.8
+ 3.1.1
+ 1.2.6
+ 3.0.3
+ 4.1.2
+ 2.2.10
+ 1.7
+ 0.9.1
+ 3.4.3
+ 3.9.1
+ 5.7.7
+ 3.0.3
+ 11.2
+ 4.9.1
+ 2.5.0
+ 3.16.1
+ 2.2.1
+ 3.4.1
+
+
+ 7.8.0
+ 3.13.0
+ 5.6.47
+ 8.2.0
+
+
+ localhost
+ http://${docker.registry.url}:2375
+ ruoyi
+ 1.2.2
+
+
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-dependencies
+ ${spring-boot.version}
+ pom
+ import
+
+
+
+
+ com.alibaba
+ druid-spring-boot-starter
+ ${druid.version}
+
+
+
+ com.github.xiaoymin
+ knife4j-spring-boot-starter
+ ${knife4j.version}
+
+
+
+
+ org.apache.poi
+ poi-ooxml
+ ${poi.version}
+
+
+
+ com.alibaba
+ easyexcel
+ ${easyexcel.version}
+
+
+
+
+ org.apache.velocity
+ velocity
+ ${velocity.version}
+
+
+
+
+ io.jsonwebtoken
+ jjwt
+ ${jwt.version}
+
+
+
+
+ com.baomidou
+ dynamic-datasource-spring-boot-starter
+ ${dynamic-ds.version}
+
+
+
+ com.baomidou
+ mybatis-plus-boot-starter
+ ${mybatis-plus.version}
+
+
+ com.baomidou
+ mybatis-plus-extension
+ ${mybatis-plus.version}
+
+
+
+ p6spy
+ p6spy
+ ${p6spy.version}
+
+
+
+ cn.hutool
+ hutool-all
+ ${hutool.version}
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+ ${feign.version}
+
+
+
+ io.github.openfeign
+ feign-okhttp
+ ${feign-okhttp.version}
+
+
+
+ com.squareup.okhttp3
+ okhttp
+ ${okhttp.version}
+
+
+
+ de.codecentric
+ spring-boot-admin-starter-server
+ ${spring-boot-admin.version}
+
+
+ de.codecentric
+ spring-boot-admin-starter-client
+ ${spring-boot-admin.version}
+
+
+
+
+ org.redisson
+ redisson-spring-boot-starter
+ ${redisson.version}
+
+
+ com.baomidou
+ lock4j-redisson-spring-boot-starter
+ ${lock4j.version}
+
+
+
+ com.ruoyi
+ ruoyi-quartz
+ ${ruoyi-vue-plus.version}
+
+
+
+
+ com.ruoyi
+ ruoyi-generator
+ ${ruoyi-vue-plus.version}
+
+
+
+
+ com.ruoyi
+ ruoyi-framework
+ ${ruoyi-vue-plus.version}
+
+
+
+
+ com.ruoyi
+ ruoyi-system
+ ${ruoyi-vue-plus.version}
+
+
+
+
+ com.ruoyi
+ ruoyi-common
+ ${ruoyi-vue-plus.version}
+
+
+
+
+ com.ruoyi
+ ruoyi-oss
+ ${ruoyi-vue-plus.version}
+
+
+
+
+ com.ruoyi
+ ruoyi-demo
+ ${ruoyi-vue-plus.version}
+
+
+
+
+
+
+ ruoyi-admin
+ ruoyi-framework
+ ruoyi-system
+ ruoyi-quartz
+ ruoyi-generator
+ ruoyi-common
+ ruoyi-demo
+ ruoyi-extend
+ ruoyi-oss
+
+ pom
+
+
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.1
+
+
+ ${java.version}
+ ${project.build.sourceEncoding}
+
+
+
+
+
+
+ src/main/resources
+
+ true
+
+
+
+
+
+
+ public
+ aliyun nexus
+ https://maven.aliyun.com/repository/public/
+
+ true
+
+
+
+
+
+
+ public
+ aliyun nexus
+ https://maven.aliyun.com/repository/public/
+
+ true
+
+
+ false
+
+
+
+
+
+
+ local
+
+
+ local
+ debug
+ '*'
+
+
+
+ dev
+
+
+ dev
+ debug
+ '*'
+
+
+
+ true
+
+
+
+ prod
+
+ prod
+ warn
+ health,info
+
+
+
+
+
+ jdk8
+
+ true
+ 1.8
+
+
+ 1.8
+
+
+
+ jdk11
+
+ 11
+
+
+ 11
+ 3.0.1
+
+
+
+
+
+ com.sun.xml.bind
+ jaxb-impl
+ ${jaxb.version}
+
+
+
+
+
+
+ com.sun.xml.bind
+ jaxb-impl
+
+
+
+
+
+
diff --git a/ruoyi-admin/Dockerfile b/ruoyi-admin/Dockerfile
new file mode 100644
index 00000000..dc484c5b
--- /dev/null
+++ b/ruoyi-admin/Dockerfile
@@ -0,0 +1,15 @@
+FROM anapsix/alpine-java:8_server-jre_unlimited
+
+MAINTAINER Lion Li
+
+RUN mkdir -p /ruoyi/server
+RUN mkdir -p /ruoyi/server/logs
+RUN mkdir -p /ruoyi/server/ruoyi/uploadPath
+
+WORKDIR /ruoyi/server
+
+EXPOSE 8080
+
+ADD ./target/ruoyi-admin.jar ./app.jar
+
+ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"]
diff --git a/ruoyi-admin/pom.xml b/ruoyi-admin/pom.xml
new file mode 100644
index 00000000..b46acd50
--- /dev/null
+++ b/ruoyi-admin/pom.xml
@@ -0,0 +1,113 @@
+
+
+
+ ruoyi-vue-plus
+ com.ruoyi
+ 3.0.0
+
+ 4.0.0
+ jar
+ ruoyi-admin
+
+
+ web服务入口
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-devtools
+ true
+
+
+
+
+ mysql
+ mysql-connector-java
+
+
+
+
+ com.ruoyi
+ ruoyi-framework
+
+
+
+
+ com.ruoyi
+ ruoyi-quartz
+
+
+
+ com.ruoyi
+ ruoyi-oss
+
+
+
+
+ com.ruoyi
+ ruoyi-generator
+
+
+
+
+ com.ruoyi
+ ruoyi-demo
+
+
+
+
+
+ ${project.artifactId}
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring-boot.version}
+
+ true
+
+
+
+
+ repackage
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-war-plugin
+ 3.1.0
+
+ false
+ ${project.artifactId}
+
+
+
+ com.spotify
+ docker-maven-plugin
+ ${docker.plugin.version}
+
+ ${docker.namespace}/ruoyi-server:${project.version}
+ ${project.basedir}
+ ${docker.registry.host}
+ ${docker.registry.url}
+ ${docker.registry.url}
+
+
+ /
+ ${project.build.directory}
+ ${project.build.finalName}.jar
+
+
+
+
+
+
+
+
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java b/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java
new file mode 100644
index 00000000..3a1a4aef
--- /dev/null
+++ b/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java
@@ -0,0 +1,21 @@
+package com.ruoyi;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * 启动程序
+ *
+ * @author ruoyi
+ */
+
+@SpringBootApplication
+public class RuoYiApplication
+{
+ public static void main(String[] args)
+ {
+ System.setProperty("spring.devtools.restart.enabled", "false");
+ SpringApplication.run(RuoYiApplication.class, args);
+ System.out.println("(♥◠‿◠)ノ゙ RuoYi-Vue-Plus启动成功 ლ(´ڡ`ლ)゙");
+ }
+}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/RuoYiServletInitializer.java b/ruoyi-admin/src/main/java/com/ruoyi/RuoYiServletInitializer.java
new file mode 100644
index 00000000..6de67dc7
--- /dev/null
+++ b/ruoyi-admin/src/main/java/com/ruoyi/RuoYiServletInitializer.java
@@ -0,0 +1,18 @@
+package com.ruoyi;
+
+import org.springframework.boot.builder.SpringApplicationBuilder;
+import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
+
+/**
+ * web容器中进行部署
+ *
+ * @author ruoyi
+ */
+public class RuoYiServletInitializer extends SpringBootServletInitializer
+{
+ @Override
+ protected SpringApplicationBuilder configure(SpringApplicationBuilder application)
+ {
+ return application.sources(RuoYiApplication.class);
+ }
+}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CaptchaController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CaptchaController.java
new file mode 100644
index 00000000..210cceec
--- /dev/null
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CaptchaController.java
@@ -0,0 +1,125 @@
+package com.ruoyi.web.controller.common;
+
+import cn.hutool.captcha.AbstractCaptcha;
+import cn.hutool.captcha.CircleCaptcha;
+import cn.hutool.captcha.LineCaptcha;
+import cn.hutool.captcha.ShearCaptcha;
+import cn.hutool.captcha.generator.CodeGenerator;
+import cn.hutool.captcha.generator.RandomGenerator;
+import cn.hutool.core.convert.Convert;
+import cn.hutool.core.util.IdUtil;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.constant.Constants;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.redis.RedisCache;
+import com.ruoyi.framework.captcha.UnsignedMathGenerator;
+import com.ruoyi.framework.config.properties.CaptchaProperties;
+import com.ruoyi.system.service.ISysConfigService;
+import org.springframework.beans.factory.annotation.Autowired;
+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.Map;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * 验证码操作处理
+ *
+ * @author ruoyi
+ */
+@RestController
+public class CaptchaController {
+
+ // 圆圈干扰验证码
+ @Resource(name = "CircleCaptcha")
+ private CircleCaptcha circleCaptcha;
+ // 线段干扰的验证码
+ @Resource(name = "LineCaptcha")
+ private LineCaptcha lineCaptcha;
+ // 扭曲干扰验证码
+ @Resource(name = "ShearCaptcha")
+ private ShearCaptcha shearCaptcha;
+
+ @Autowired
+ private RedisCache redisCache;
+
+ @Autowired
+ private CaptchaProperties captchaProperties;
+
+ @Autowired
+ private ISysConfigService configService;
+
+ /**
+ * 生成验证码
+ */
+ @GetMapping("/captchaImage")
+ public AjaxResult getCode() {
+ Map ajax = new HashMap<>();
+ boolean captchaOnOff = configService.selectCaptchaOnOff();
+ ajax.put("captchaOnOff", captchaOnOff);
+ if (!captchaOnOff) {
+ return AjaxResult.success(ajax);
+ }
+ // 保存验证码信息
+ String uuid = IdUtil.simpleUUID();
+ String verifyKey = Constants.CAPTCHA_CODE_KEY + uuid;
+ String code = null;
+ // 生成验证码
+ CodeGenerator codeGenerator;
+ AbstractCaptcha captcha;
+ switch (captchaProperties.getType()) {
+ case "math":
+ codeGenerator = new UnsignedMathGenerator(captchaProperties.getNumberLength());
+ break;
+ case "char":
+ codeGenerator = new RandomGenerator(captchaProperties.getCharLength());
+ break;
+ default:
+ throw new IllegalArgumentException("验证码类型异常");
+ }
+ switch (captchaProperties.getCategory()) {
+ case "line":
+ captcha = lineCaptcha;
+ break;
+ case "circle":
+ captcha = circleCaptcha;
+ break;
+ case "shear":
+ captcha = shearCaptcha;
+ break;
+ default:
+ throw new IllegalArgumentException("验证码类别异常");
+ }
+ captcha.setGenerator(codeGenerator);
+ captcha.createCode();
+ if ("math".equals(captchaProperties.getType())) {
+ code = getCodeResult(captcha.getCode());
+ } else if ("char".equals(captchaProperties.getType())) {
+ code = captcha.getCode();
+ }
+ redisCache.setCacheObject(verifyKey, code, Constants.CAPTCHA_EXPIRATION, TimeUnit.MINUTES);
+ ajax.put("uuid", uuid);
+ ajax.put("img", captcha.getImageBase64());
+ return AjaxResult.success(ajax);
+ }
+
+ private String getCodeResult(String capStr) {
+ int numberLength = captchaProperties.getNumberLength();
+ int a = Convert.toInt(StringUtils.substring(capStr, 0, numberLength).trim());
+ char operator = capStr.charAt(numberLength);
+ int b = Convert.toInt(StringUtils.substring(capStr, numberLength + 1, numberLength + 1 + numberLength).trim());
+ switch (operator) {
+ case '*':
+ return a * b + "";
+ case '+':
+ return a + b + "";
+ case '-':
+ return a - b + "";
+ default:
+ return "";
+ }
+ }
+
+}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/CacheController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/CacheController.java
new file mode 100644
index 00000000..66749ef4
--- /dev/null
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/CacheController.java
@@ -0,0 +1,50 @@
+package com.ruoyi.web.controller.monitor;
+
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.core.domain.AjaxResult;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.RedisCallback;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.*;
+
+/**
+ * 缓存监控
+ *
+ * @author ruoyi
+ */
+@RestController
+@RequestMapping("/monitor/cache")
+public class CacheController
+{
+ @Autowired
+ private RedisTemplate redisTemplate;
+
+ @PreAuthorize("@ss.hasPermi('monitor:cache:list')")
+ @GetMapping()
+ public AjaxResult getInfo() throws Exception
+ {
+ Properties info = (Properties) redisTemplate.execute((RedisCallback