初始化项目提交,并添加 flowable 7 的 dm 兼容
75
.gitignore
vendored
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
|
||||||
|
# 查看更多 .gitignore 配置 -> https://help.github.com/articles/ignoring-files/
|
||||||
|
|
||||||
|
target/
|
||||||
|
!.mvn/wrapper/maven-wrapper.jar
|
||||||
|
|
||||||
|
.flattened-pom.xml
|
||||||
|
|
||||||
|
### STS ###
|
||||||
|
.apt_generated
|
||||||
|
.classpath
|
||||||
|
.factorypath
|
||||||
|
.project
|
||||||
|
.settings
|
||||||
|
.springBeans
|
||||||
|
.sts4-cache
|
||||||
|
|
||||||
|
### IntelliJ IDEA ###
|
||||||
|
.idea
|
||||||
|
*.iws
|
||||||
|
*.iml
|
||||||
|
*.ipr
|
||||||
|
*.class
|
||||||
|
target/*
|
||||||
|
|
||||||
|
### NetBeans ###
|
||||||
|
/nbproject/private/
|
||||||
|
/nbbuild/
|
||||||
|
/dist/
|
||||||
|
/nbdist/
|
||||||
|
/.nb-gradle/
|
||||||
|
/build/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### admin-web ###
|
||||||
|
|
||||||
|
# dependencies
|
||||||
|
**/node_modules
|
||||||
|
|
||||||
|
# roadhog-api-doc ignore
|
||||||
|
/src/utils/request-temp.js
|
||||||
|
_roadhog-api-doc
|
||||||
|
|
||||||
|
# production
|
||||||
|
/dist
|
||||||
|
/.vscode
|
||||||
|
|
||||||
|
# misc
|
||||||
|
.DS_Store
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-error.log
|
||||||
|
|
||||||
|
/coverage
|
||||||
|
.idea
|
||||||
|
yarn.lock
|
||||||
|
package-lock.json
|
||||||
|
*bak
|
||||||
|
.vscode
|
||||||
|
|
||||||
|
# visual studio code
|
||||||
|
.history
|
||||||
|
*.log
|
||||||
|
|
||||||
|
functions/mock
|
||||||
|
.temp/**
|
||||||
|
|
||||||
|
# umi
|
||||||
|
.umi
|
||||||
|
.umi-production
|
||||||
|
|
||||||
|
# screenshot
|
||||||
|
screenshot
|
||||||
|
.firebase
|
||||||
|
sessionStore
|
||||||
BIN
.image/Java监控.jpg
Normal file
|
After Width: | Height: | Size: 112 KiB |
BIN
.image/MySQL.jpg
Normal file
|
After Width: | Height: | Size: 142 KiB |
BIN
.image/OA请假-列表.jpg
Normal file
|
After Width: | Height: | Size: 152 KiB |
BIN
.image/OA请假-发起.jpg
Normal file
|
After Width: | Height: | Size: 68 KiB |
BIN
.image/OA请假-详情.jpg
Normal file
|
After Width: | Height: | Size: 65 KiB |
BIN
.image/Redis.jpg
Normal file
|
After Width: | Height: | Size: 95 KiB |
BIN
.image/admin-uniapp/01.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
.image/admin-uniapp/02.png
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
.image/admin-uniapp/03.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
.image/admin-uniapp/04.png
Normal file
|
After Width: | Height: | Size: 9.7 KiB |
BIN
.image/admin-uniapp/05.png
Normal file
|
After Width: | Height: | Size: 56 KiB |
BIN
.image/admin-uniapp/06.png
Normal file
|
After Width: | Height: | Size: 8.6 KiB |
BIN
.image/admin-uniapp/07.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
.image/admin-uniapp/08.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
.image/admin-uniapp/09.png
Normal file
|
After Width: | Height: | Size: 7.0 KiB |
BIN
.image/common/ai-feature.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
.image/common/ai-preview.gif
Normal file
|
After Width: | Height: | Size: 348 KiB |
BIN
.image/common/bpm-feature.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
.image/common/crm-feature.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
.image/common/erp-feature.png
Normal file
|
After Width: | Height: | Size: 46 KiB |
BIN
.image/common/infra-feature.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
.image/common/mall-feature.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
.image/common/mall-preview.png
Normal file
|
After Width: | Height: | Size: 204 KiB |
BIN
.image/common/project-vs.png
Normal file
|
After Width: | Height: | Size: 139 KiB |
BIN
.image/common/ruoyi-vue-pro-architecture.png
Normal file
|
After Width: | Height: | Size: 69 KiB |
BIN
.image/common/ruoyi-vue-pro-biz.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
.image/common/system-feature.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
.image/common/yudao-cloud-architecture.png
Normal file
|
After Width: | Height: | Size: 201 KiB |
BIN
.image/common/yudao-roadmap.png
Normal file
|
After Width: | Height: | Size: 60 KiB |
BIN
.image/个人中心.jpg
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
.image/代码生成.jpg
Normal file
|
After Width: | Height: | Size: 130 KiB |
BIN
.image/令牌管理.jpg
Normal file
|
After Width: | Height: | Size: 89 KiB |
BIN
.image/任务列表-审批.jpg
Normal file
|
After Width: | Height: | Size: 89 KiB |
BIN
.image/任务列表-已办.jpg
Normal file
|
After Width: | Height: | Size: 160 KiB |
BIN
.image/任务列表-待办.jpg
Normal file
|
After Width: | Height: | Size: 150 KiB |
BIN
.image/任务日志.jpg
Normal file
|
After Width: | Height: | Size: 124 KiB |
BIN
.image/商户信息.jpg
Normal file
|
After Width: | Height: | Size: 83 KiB |
BIN
.image/在线用户.jpg
Normal file
|
After Width: | Height: | Size: 73 KiB |
BIN
.image/大屏设计器-列表.jpg
Normal file
|
After Width: | Height: | Size: 53 KiB |
BIN
.image/大屏设计器-编辑.jpg
Normal file
|
After Width: | Height: | Size: 109 KiB |
BIN
.image/大屏设计器-预览.jpg
Normal file
|
After Width: | Height: | Size: 69 KiB |
BIN
.image/字典数据.jpg
Normal file
|
After Width: | Height: | Size: 78 KiB |
BIN
.image/字典类型.jpg
Normal file
|
After Width: | Height: | Size: 126 KiB |
BIN
.image/定时任务.jpg
Normal file
|
After Width: | Height: | Size: 74 KiB |
BIN
.image/岗位管理.jpg
Normal file
|
After Width: | Height: | Size: 80 KiB |
BIN
.image/工作流设计器-bpmn.jpg
Normal file
|
After Width: | Height: | Size: 177 KiB |
BIN
.image/工作流设计器-simple.jpg
Normal file
|
After Width: | Height: | Size: 126 KiB |
BIN
.image/应用信息-列表.jpg
Normal file
|
After Width: | Height: | Size: 93 KiB |
BIN
.image/应用信息-编辑.jpg
Normal file
|
After Width: | Height: | Size: 93 KiB |
BIN
.image/应用管理.jpg
Normal file
|
After Width: | Height: | Size: 55 KiB |
BIN
.image/我的流程-列表.jpg
Normal file
|
After Width: | Height: | Size: 176 KiB |
BIN
.image/我的流程-发起.jpg
Normal file
|
After Width: | Height: | Size: 91 KiB |
BIN
.image/我的流程-详情.jpg
Normal file
|
After Width: | Height: | Size: 87 KiB |
BIN
.image/报表设计器-图形报表.jpg
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
.image/报表设计器-打印设计.jpg
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
.image/报表设计器-数据报表.jpg
Normal file
|
After Width: | Height: | Size: 41 KiB |
BIN
.image/操作日志.jpg
Normal file
|
After Width: | Height: | Size: 98 KiB |
BIN
.image/支付订单.jpg
Normal file
|
After Width: | Height: | Size: 208 KiB |
BIN
.image/敏感词.jpg
Normal file
|
After Width: | Height: | Size: 47 KiB |
BIN
.image/数据库文档.jpg
Normal file
|
After Width: | Height: | Size: 97 KiB |
BIN
.image/文件管理.jpg
Normal file
|
After Width: | Height: | Size: 74 KiB |
BIN
.image/文件管理2.jpg
Normal file
|
After Width: | Height: | Size: 114 KiB |
BIN
.image/文件配置.jpg
Normal file
|
After Width: | Height: | Size: 116 KiB |
BIN
.image/日志中心.jpg
Normal file
|
After Width: | Height: | Size: 84 KiB |
BIN
.image/流程模型-列表.jpg
Normal file
|
After Width: | Height: | Size: 173 KiB |
BIN
.image/流程模型-定义.jpg
Normal file
|
After Width: | Height: | Size: 125 KiB |
BIN
.image/流程模型-设计.jpg
Normal file
|
After Width: | Height: | Size: 125 KiB |
BIN
.image/流程表单.jpg
Normal file
|
After Width: | Height: | Size: 148 KiB |
BIN
.image/生成效果.jpg
Normal file
|
After Width: | Height: | Size: 128 KiB |
BIN
.image/用户分组.jpg
Normal file
|
After Width: | Height: | Size: 82 KiB |
BIN
.image/用户管理.jpg
Normal file
|
After Width: | Height: | Size: 112 KiB |
BIN
.image/登录.jpg
Normal file
|
After Width: | Height: | Size: 93 KiB |
BIN
.image/登录日志.jpg
Normal file
|
After Width: | Height: | Size: 77 KiB |
BIN
.image/短信日志.jpg
Normal file
|
After Width: | Height: | Size: 41 KiB |
BIN
.image/短信模板.jpg
Normal file
|
After Width: | Height: | Size: 248 KiB |
BIN
.image/短信渠道.jpg
Normal file
|
After Width: | Height: | Size: 80 KiB |
BIN
.image/租户套餐.png
Normal file
|
After Width: | Height: | Size: 96 KiB |
BIN
.image/租户管理.jpg
Normal file
|
After Width: | Height: | Size: 115 KiB |
BIN
.image/系统接口.jpg
Normal file
|
After Width: | Height: | Size: 91 KiB |
BIN
.image/菜单管理.jpg
Normal file
|
After Width: | Height: | Size: 129 KiB |
BIN
.image/表单构建.jpg
Normal file
|
After Width: | Height: | Size: 102 KiB |
BIN
.image/角色管理.jpg
Normal file
|
After Width: | Height: | Size: 85 KiB |
BIN
.image/访问日志.jpg
Normal file
|
After Width: | Height: | Size: 73 KiB |
BIN
.image/退款订单.jpg
Normal file
|
After Width: | Height: | Size: 92 KiB |
BIN
.image/通知公告.jpg
Normal file
|
After Width: | Height: | Size: 77 KiB |
BIN
.image/部门管理.jpg
Normal file
|
After Width: | Height: | Size: 109 KiB |
BIN
.image/配置管理.jpg
Normal file
|
After Width: | Height: | Size: 89 KiB |
BIN
.image/链路追踪.jpg
Normal file
|
After Width: | Height: | Size: 80 KiB |
BIN
.image/错误日志.jpg
Normal file
|
After Width: | Height: | Size: 110 KiB |
BIN
.image/错误码管理.jpg
Normal file
|
After Width: | Height: | Size: 131 KiB |
BIN
.image/首页.jpg
Normal file
|
After Width: | Height: | Size: 62 KiB |
20
LICENSE
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2021 yudao-cloud
|
||||||
|
|
||||||
|
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.
|
||||||
424
README.md
@@ -1,93 +1,399 @@
|
|||||||
# jygk-dsc
|
<p align="center">
|
||||||
|
<img src="https://img.shields.io/badge/Spring%20Cloud-2024-blue.svg" alt="Coverage Status">
|
||||||
|
<img src="https://img.shields.io/badge/Spring%20Boot-3.4.5-blue.svg" alt="Downloads">
|
||||||
|
<img src="https://img.shields.io/badge/Vue-3.2-blue.svg" alt="Downloads">
|
||||||
|
<img src="https://img.shields.io/github/license/YunaiV/yudao-cloud" alt="Downloads" />
|
||||||
|
</p>
|
||||||
|
|
||||||
|
**严肃声明:现在、未来都不会有商业版本,所有代码全部开源!!**
|
||||||
|
|
||||||
|
**「我喜欢写代码,乐此不疲」**
|
||||||
|
**「我喜欢做开源,以此为乐」**
|
||||||
|
|
||||||
## Getting started
|
我 🐶 在上海艰苦奋斗,早中晚在 top3 大厂认真搬砖,夜里为开源做贡献。
|
||||||
|
|
||||||
To make it easy for you to get started with GitLab, here's a list of recommended next steps.
|
如果这个项目让你有所收获,记得 Star 关注哦,这对我是非常不错的鼓励与支持。
|
||||||
|
|
||||||
Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
|
可参考 [《迁移文档》](https://cloud.iocoder.cn/migrate-module/) ,只需要 5-10 分钟,即可将【完整版】按需迁移到【精简版】
|
||||||
|
|
||||||
## Add your files
|
## 🐶 新手必读
|
||||||
|
|
||||||
- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
|
* 演示地址【Vue3 + element-plus】:<http://dashboard-vue3.yudao.iocoder.cn>
|
||||||
- [ ] [Add files using the command line](https://docs.gitlab.com/topics/git/add_files/#add-files-to-a-git-repository) or push an existing Git repository with the following command:
|
* 演示地址【Vue3 + vben(ant-design-vue)】:<http://dashboard-vben.yudao.iocoder.cn>
|
||||||
|
* 演示地址【Vue2 + element-ui】:<http://dashboard.yudao.iocoder.cn>
|
||||||
|
* 启动文档:<https://cloud.iocoder.cn/quick-start/>
|
||||||
|
* 视频教程:<https://cloud.iocoder.cn/video/>
|
||||||
|
|
||||||
```
|
## 🐰 版本说明
|
||||||
cd existing_repo
|
|
||||||
git remote add origin http://172.16.46.63/gitlab/root/jygk-dsc.git
|
|
||||||
git branch -M main
|
|
||||||
git push -uf origin main
|
|
||||||
```
|
|
||||||
|
|
||||||
## Integrate with your tools
|
| 版本 | JDK 8 + Spring Boot 2.7 | JDK 17/21 + Spring Boot 3.2 |
|
||||||
|
|-----------------------------------------------------------------------|--------------------------------------------------------------------------|--------------------------------------------------------------------------------------|
|
||||||
|
| 【完整版】[yudao-cloud](https://gitee.com/zhijiantianya/yudao-cloud) | [`master`](https://gitee.com/zhijiantianya/yudao-cloud/tree/master/) 分支 | [`master-jdk17`](https://gitee.com/zhijiantianya/yudao-cloud/tree/master-jdk17/) 分支 |
|
||||||
|
| 【精简版】[yudao-cloud-mini](https://gitee.com/yudaocode/yudao-cloud-mini) | [`master`](https://gitee.com/yudaocode/yudao-cloud-mini/tree/master/) 分支 | [`master-jdk17`](https://gitee.com/yudaocode/yudao-cloud-mini/tree/master-jdk17/) 分支 |
|
||||||
|
|
||||||
- [ ] [Set up project integrations](http://172.16.46.63/gitlab/root/jygk-dsc/-/settings/integrations)
|
* 【完整版】:包括系统功能、基础设施、会员中心、数据报表、工作流程、商城系统、微信公众号、CRM、ERP 等功能
|
||||||
|
* 【精简版】:只包括系统功能、基础设施功能,不包括会员中心、数据报表、工作流程、商城系统、微信公众号、CRM、ERP 等功能
|
||||||
|
|
||||||
## Collaborate with your team
|
可参考 [《迁移文档》](https://cloud.iocoder.cn/migrate-module/) ,只需要 5-10 分钟,即可将【完整版】按需迁移到【精简版】
|
||||||
|
|
||||||
- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
|
## 🐯 平台简介
|
||||||
- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
|
|
||||||
- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
|
|
||||||
- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
|
|
||||||
- [ ] [Set auto-merge](https://docs.gitlab.com/user/project/merge_requests/auto_merge/)
|
|
||||||
|
|
||||||
## Test and Deploy
|
**芋道**,以开发者为中心,打造中国第一流的快速开发平台,全部开源,个人与企业可 100% 免费使用。
|
||||||
|
|
||||||
Use the built-in continuous integration in GitLab.
|
> 有任何问题,或者想要的功能,可以在 _Issues_ 中提给艿艿。
|
||||||
|
>
|
||||||
|
> 😜 给项目点点 Star 吧,这对我们真的很重要!
|
||||||
|
|
||||||
- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/)
|

|
||||||
- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing (SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
|
|
||||||
- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
|
|
||||||
- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
|
|
||||||
- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
|
|
||||||
|
|
||||||
***
|
* Java 后端:`master` 分支为 JDK 8 + Spring Boot 2.7,`master-jdk17` 分支为 JDK 17/21 + Spring Boot 3.2
|
||||||
|
* 管理后台的电脑端:Vue3 提供 [element-plus](https://gitee.com/yudaocode/yudao-ui-admin-vue3)、[vben(ant-design-vue)](https://gitee.com/yudaocode/yudao-ui-admin-vben) 两个版本,Vue2 提供 [element-ui](https://gitee.com/zhijiantianya/ruoyi-vue-pro/tree/master/yudao-ui-admin) 版本
|
||||||
|
* 管理后台的移动端:采用 [uni-app](https://github.com/dcloudio/uni-app) 方案,一份代码多终端适配,同时支持 APP、小程序、H5!
|
||||||
|
* 后端采用 Spring Cloud Alibaba 微服务架构,注册中心 + 配置中心 Nacos,定时任务 XXL-Job,服务保障 Sentinel,服务网关 Gateway,分布式事务 Seata
|
||||||
|
* 数据库可使用 MySQL、Oracle、PostgreSQL、SQL Server、MariaDB、国产达梦 DM、TiDB 等,基于 MyBatis Plus、Redis + Redisson 操作
|
||||||
|
* 消息队列可使用 Event、Redis、RabbitMQ、Kafka、RocketMQ 等
|
||||||
|
* 权限认证使用 Spring Security & Token & Redis,支持多终端、多种用户的认证系统,支持 SSO 单点登录
|
||||||
|
* 支持加载动态权限菜单,按钮级别权限控制,Redis 缓存提升性能
|
||||||
|
* 支持 SaaS 多租户,可自定义每个租户的权限,提供透明化的多租户底层封装
|
||||||
|
* 工作流使用 Flowable,支持动态表单、在线设计流程、会签 / 或签、多种任务分配方式
|
||||||
|
* 高效率开发,使用代码生成器可以一键生成 Java、Vue 前后端代码、SQL 脚本、接口文档,支持单表、树表、主子表
|
||||||
|
* 实时通信,采用 Spring WebSocket 实现,内置 Token 身份校验,支持 WebSocket 集群
|
||||||
|
* 集成微信小程序、微信公众号、企业微信、钉钉等三方登陆,集成支付宝、微信等支付与退款
|
||||||
|
* 集成阿里云、腾讯云等短信渠道,集成 MinIO、阿里云、腾讯云、七牛云等云存储服务
|
||||||
|
* 集成报表设计器、大屏设计器,通过拖拽即可生成酷炫的报表与大屏
|
||||||
|
|
||||||
# Editing this README
|
## 🐳 项目关系
|
||||||
|
|
||||||
When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thanks to [makeareadme.com](https://www.makeareadme.com/) for this template.
|

|
||||||
|
|
||||||
## Suggestions for a good README
|
三个项目的功能对比,可见社区共同整理的 [国产开源项目对比](https://www.yuque.com/xiatian-bsgny/lm0ec1/wqf8mn) 表格。
|
||||||
|
|
||||||
Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
|
### 后端项目
|
||||||
|
|
||||||
## Name
|
| 项目 | Star | 简介 |
|
||||||
Choose a self-explaining name for your project.
|
|-----------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------|
|
||||||
|
| [ruoyi-vue-pro](https://gitee.com/zhijiantianya/ruoyi-vue-pro) | [](https://gitee.com/zhijiantianya/ruoyi-vue-pro) [](https://github.com/YunaiV/ruoyi-vue-pro) | 基于 Spring Boot 多模块架构 |
|
||||||
|
| [yudao-cloud](https://gitee.com/zhijiantianya/yudao-cloud) | [](https://gitee.com/zhijiantianya/yudao-cloud) [](https://github.com/YunaiV/yudao-cloud) | 基于 Spring Cloud 微服务架构 |
|
||||||
|
| [Spring-Boot-Labs](https://gitee.com/yudaocode/SpringBoot-Labs) | [](https://gitee.com/zhijiantianya/yudao-cloud) [](https://github.com/yudaocode/SpringBoot-Labs) | 系统学习 Spring Boot & Cloud 专栏 |
|
||||||
|
|
||||||
## Description
|
### 前端项目
|
||||||
Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
|
|
||||||
|
|
||||||
## Badges
|
| 项目 | Star | 简介 |
|
||||||
On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
|
|----------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------|
|
||||||
|
| [yudao-ui-admin-vue3](https://gitee.com/yudaocode/yudao-ui-admin-vue3) | [](https://gitee.com/yudaocode/yudao-ui-admin-vue3) [](https://github.com/yudaocode/yudao-ui-admin-vue3) | 基于 Vue3 + element-plus 实现的管理后台 |
|
||||||
|
| [yudao-ui-admin-vben](https://gitee.com/yudaocode/yudao-ui-admin-vben) | [](https://gitee.com/yudaocode/yudao-ui-admin-vben) [](https://github.com/yudaocode/yudao-ui-admin-vben) | 基于 Vue3 + vben(ant-design-vue) 实现的管理后台 |
|
||||||
|
| [yudao-mall-uniapp](https://gitee.com/yudaocode/yudao-mall-uniapp) | [](https://gitee.com/yudaocode/yudao-mall-uniapp) [](https://github.com/yudaocode/yudao-mall-uniapp) | 基于 uni-app 实现的商城小程序 |
|
||||||
|
| [yudao-ui-admin-vue2](https://gitee.com/yudaocode/yudao-ui-admin-vue2) | [](https://gitee.com/yudaocode/yudao-ui-admin-vue2) [](https://github.com/yudaocode/yudao-ui-admin-vue2) | 基于 Vue2 + element-ui 实现的管理后台 |
|
||||||
|
| [yudao-ui-admin-uniapp](https://gitee.com/yudaocode/yudao-ui-admin-uniapp) | [](https://gitee.com/yudaocode/yudao-ui-admin-uniapp) [](https://github.com/yudaocode/yudao-ui-admin-uniapp) | 基于 Vue2 + element-ui 实现的管理后台 |
|
||||||
|
| [yudao-ui-go-view](https://gitee.com/yudaocode/yudao-ui-go-view) | [](https://gitee.com/yudaocode/yudao-ui-go-view) [](https://github.com/yudaocode/yudao-ui-go-view) | 基于 Vue3 + naive-ui 实现的大屏报表 |
|
||||||
|
|
||||||
## Visuals
|
## 😎 开源协议
|
||||||
Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
|
|
||||||
|
|
||||||
## Installation
|
**为什么推荐使用本项目?**
|
||||||
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
|
|
||||||
|
|
||||||
## Usage
|
① 本项目采用比 Apache 2.0 更宽松的 [MIT License](https://gitee.com/zhijiantianya/ruoyi-vue-pro/blob/master/LICENSE) 开源协议,个人与企业可 100% 免费使用,不用保留类作者、Copyright 信息。
|
||||||
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
|
|
||||||
|
|
||||||
## Support
|
② 代码全部开源,不会像其他项目一样,只开源部分代码,让你无法了解整个项目的架构设计。[国产开源项目对比](https://www.yuque.com/xiatian-bsgny/lm0ec1/wqf8mn)
|
||||||
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
|
|
||||||
|
|
||||||
## Roadmap
|

|
||||||
If you have ideas for releases in the future, it is a good idea to list them in the README.
|
|
||||||
|
|
||||||
## Contributing
|
③ 代码整洁、架构整洁,遵循《阿里巴巴 Java 开发手册》规范,代码注释详细,113770 行 Java 代码,42462 行代码注释。
|
||||||
State if you are open to contributions and what your requirements are for accepting them.
|
|
||||||
|
|
||||||
For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
|
## 🤝 项目外包
|
||||||
|
|
||||||
You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
|
我们也是接外包滴,如果你有项目想要外包,可以微信联系【**Aix9975**】。
|
||||||
|
|
||||||
## Authors and acknowledgment
|
团队包含专业的项目经理、架构师、前端工程师、后端工程师、测试工程师、运维工程师,可以提供全流程的外包服务。
|
||||||
Show your appreciation to those who have contributed to the project.
|
|
||||||
|
|
||||||
## License
|
项目可以是商城、SCRM 系统、OA 系统、物流系统、ERP 系统、CMS 系统、HIS 系统、支付系统、IM 聊天、微信公众号、微信小程序等等。
|
||||||
For open source projects, say how it is licensed.
|
|
||||||
|
|
||||||
## Project status
|
## 🐼 内置功能
|
||||||
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
|
|
||||||
|
系统内置多种多种业务功能,可以用于快速你的业务系统:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
* 通用模块(必选):系统功能、基础设施
|
||||||
|
* 通用模块(可选):工作流程、支付系统、数据报表、会员中心
|
||||||
|
* 业务系统(按需):ERP 系统、CRM 系统、商城系统、微信公众号、AI 大模型
|
||||||
|
|
||||||
|
> 友情提示:本项目基于 RuoYi-Vue 修改,**重构优化**后端的代码,**美化**前端的界面。
|
||||||
|
>
|
||||||
|
> * 额外新增的功能,我们使用 🚀 标记。
|
||||||
|
> * 重新实现的功能,我们使用 ⭐️ 标记。
|
||||||
|
|
||||||
|
🙂 所有功能,都通过 **单元测试** 保证高质量。
|
||||||
|
|
||||||
|
### 系统功能
|
||||||
|
|
||||||
|
| | 功能 | 描述 |
|
||||||
|
|-----|-------|---------------------------------|
|
||||||
|
| | 用户管理 | 用户是系统操作者,该功能主要完成系统用户配置 |
|
||||||
|
| ⭐️ | 在线用户 | 当前系统中活跃用户状态监控,支持手动踢下线 |
|
||||||
|
| | 角色管理 | 角色菜单权限分配、设置角色按机构进行数据范围权限划分 |
|
||||||
|
| | 菜单管理 | 配置系统菜单、操作权限、按钮权限标识等,本地缓存提供性能 |
|
||||||
|
| | 部门管理 | 配置系统组织机构(公司、部门、小组),树结构展现支持数据权限 |
|
||||||
|
| | 岗位管理 | 配置系统用户所属担任职务 |
|
||||||
|
| 🚀 | 租户管理 | 配置系统租户,支持 SaaS 场景下的多租户功能 |
|
||||||
|
| 🚀 | 租户套餐 | 配置租户套餐,自定每个租户的菜单、操作、按钮的权限 |
|
||||||
|
| | 字典管理 | 对系统中经常使用的一些较为固定的数据进行维护 |
|
||||||
|
| 🚀 | 短信管理 | 短信渠道、短息模板、短信日志,对接阿里云、腾讯云等主流短信平台 |
|
||||||
|
| 🚀 | 邮件管理 | 邮箱账号、邮件模版、邮件发送日志,支持所有邮件平台 |
|
||||||
|
| 🚀 | 站内信 | 系统内的消息通知,提供站内信模版、站内信消息 |
|
||||||
|
| 🚀 | 操作日志 | 系统正常操作日志记录和查询,集成 Swagger 生成日志内容 |
|
||||||
|
| ⭐️ | 登录日志 | 系统登录日志记录查询,包含登录异常 |
|
||||||
|
| 🚀 | 错误码管理 | 系统所有错误码的管理,可在线修改错误提示,无需重启服务 |
|
||||||
|
| | 通知公告 | 系统通知公告信息发布维护 |
|
||||||
|
| 🚀 | 敏感词 | 配置系统敏感词,支持标签分组 |
|
||||||
|
| 🚀 | 应用管理 | 管理 SSO 单点登录的应用,支持多种 OAuth2 授权方式 |
|
||||||
|
| 🚀 | 地区管理 | 展示省份、城市、区镇等城市信息,支持 IP 对应城市 |
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### 工作流程
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
基于 Flowable 构建,可支持信创(国产)数据库,满足中国特色流程操作:
|
||||||
|
|
||||||
|
| BPMN 设计器 | 钉钉/飞书设计器 |
|
||||||
|
|------------------------------|--------------------------------|
|
||||||
|
|  |  |
|
||||||
|
|
||||||
|
> 历经头部企业生产验证,工作流引擎须标配仿钉钉/飞书 + BPMN 双设计器!!!
|
||||||
|
>
|
||||||
|
> 前者支持轻量配置简单流程,后者实现复杂场景深度编排
|
||||||
|
|
||||||
|
| 功能列表 | 功能描述 | 是否完成 |
|
||||||
|
|------------|-------------------------------------------------------------------------------------|------|
|
||||||
|
| SIMPLE 设计器 | 仿钉钉/飞书设计器,支持拖拽搭建表单流程,10 分钟快速完成审批流程配置 | ✅ |
|
||||||
|
| BPMN 设计器 | 基于 BPMN 标准开发,适配复杂业务场景,满足多层级审批及流程自动化需求 | ✅ |
|
||||||
|
| 会签 | 同一个审批节点设置多个人(如 A、B、C 三人,三人会同时收到待办任务),需全部同意之后,审批才可到下一审批节点 | ✅ |
|
||||||
|
| 或签 | 同一个审批节点设置多个人,任意一个人处理后,就能进入下一个节点 | ✅ |
|
||||||
|
| 依次审批 | (顺序会签)同一个审批节点设置多个人(如 A、B、C 三人),三人按顺序依次收到待办,即 A 先审批,A 提交后 B 才能审批,需全部同意之后,审批才可到下一审批节点 | ✅ |
|
||||||
|
| 抄送 | 将审批结果通知给抄送人,同一个审批默认排重,不重复抄送给同一人 | ✅ |
|
||||||
|
| 驳回 | (退回)将审批重置发送给某节点,重新审批。可驳回至发起人、上一节点、任意节点 | ✅ |
|
||||||
|
| 转办 | A 转给其 B 审批,B 审批后,进入下一节点 | ✅ |
|
||||||
|
| 委派 | A 转给其 B 审批,B 审批后,转给 A,A 继续审批后进入下一节点 | ✅ |
|
||||||
|
| 加签 | 允许当前审批人根据需要,自行增加当前节点的审批人,支持向前、向后加签 | ✅ |
|
||||||
|
| 减签 | (取消加签)在当前审批人操作之前,减少审批人 | ✅ |
|
||||||
|
| 撤销 | (取消流程)流程发起人,可以对流程进行撤销处理 | ✅ |
|
||||||
|
| 终止 | 系统管理员,在任意节点终止流程实例 | ✅ |
|
||||||
|
| 表单权限 | 支持拖拉拽配置表单,每个审批节点可配置只读、编辑、隐藏权限 | ✅ |
|
||||||
|
| 超时审批 | 配置超时审批时间,超时后自动触发审批通过、不通过、驳回等操作 | ✅ |
|
||||||
|
| 自动提醒 | 配置提醒时间,到达时间后自动触发短信、邮箱、站内信等通知提醒,支持自定义重复提醒频次 | ✅ |
|
||||||
|
| 父子流程 | 主流程设置子流程节点,子流程节点会自动触发子流程。子流程结束后,主流程才会执行(继续往下下执行),支持同步子流程、异步子流程 | ✅ |
|
||||||
|
| 条件分支 | (排它分支)用于在流程中实现决策,即根据条件选择一个分支执行 | ✅ |
|
||||||
|
| 并行分支 | 允许将流程分成多条分支,不进行条件判断,所有分支都会执行 | ✅ |
|
||||||
|
| 包容分支 | (条件分支 + 并行分支的结合体)允许基于条件选择多条分支执行,但如果没有任何一个分支满足条件,则可以选择默认分支 | ✅ |
|
||||||
|
| 路由分支 | 根据条件选择一个分支执行(重定向到指定配置节点),也可以选择默认分支执行(继续往下执行) | ✅ |
|
||||||
|
| 触发节点 | 执行到该节点,触发 HTTP 请求、HTTP 回调、更新数据、删除数据等 | ✅ |
|
||||||
|
| 延迟节点 | 执行到该节点,审批等待一段时间再执行,支持固定时长、固定日期等 | ✅ |
|
||||||
|
| 拓展设置 | 流程前置/后置通知,节点(任务)前置、后置通知,流程报表,自动审批去重,自定流程编号、标题、摘要,流程报表等 | ✅ |
|
||||||
|
|
||||||
|
### 支付系统
|
||||||
|
|
||||||
|
| | 功能 | 描述 |
|
||||||
|
|-----|------|---------------------------|
|
||||||
|
| 🚀 | 应用信息 | 配置商户的应用信息,对接支付宝、微信等多个支付渠道 |
|
||||||
|
| 🚀 | 支付订单 | 查看用户发起的支付宝、微信等的【支付】订单 |
|
||||||
|
| 🚀 | 退款订单 | 查看用户发起的支付宝、微信等的【退款】订单 |
|
||||||
|
| 🚀 | 回调通知 | 查看支付回调业务的【支付】【退款】的通知结果 |
|
||||||
|
| 🚀 | 接入示例 | 提供接入支付系统的【支付】【退款】的功能实战 |
|
||||||
|
|
||||||
|
### 基础设施
|
||||||
|
|
||||||
|
| | 功能 | 描述 |
|
||||||
|
|-----|-----------|----------------------------------------------|
|
||||||
|
| 🚀 | 代码生成 | 前后端代码的生成(Java、Vue、SQL、单元测试),支持 CRUD 下载 |
|
||||||
|
| 🚀 | 系统接口 | 基于 Swagger 自动生成相关的 RESTful API 接口文档 |
|
||||||
|
| 🚀 | 数据库文档 | 基于 Screw 自动生成数据库文档,支持导出 Word、HTML、MD 格式 |
|
||||||
|
| | 表单构建 | 拖动表单元素生成相应的 HTML 代码,支持导出 JSON、Vue 文件 |
|
||||||
|
| 🚀 | 配置管理 | 对系统动态配置常用参数,支持 SpringBoot 加载 |
|
||||||
|
| ⭐️ | 定时任务 | 在线(添加、修改、删除)任务调度包含执行结果日志 |
|
||||||
|
| 🚀 | 文件服务 | 支持将文件存储到 S3(MinIO、阿里云、腾讯云、七牛云)、本地、FTP、数据库等 |
|
||||||
|
| 🚀 | WebSocket | 提供 WebSocket 接入示例,支持一对一、一对多发送方式 |
|
||||||
|
| 🚀 | API 日志 | 包括 RESTful API 访问日志、异常日志两部分,方便排查 API 相关的问题 |
|
||||||
|
| | MySQL 监控 | 监视当前系统数据库连接池状态,可进行分析SQL找出系统性能瓶颈 |
|
||||||
|
| | Redis 监控 | 监控 Redis 数据库的使用情况,使用的 Redis Key 管理 |
|
||||||
|
| 🚀 | 消息队列 | 基于 Redis 实现消息队列,Stream 提供集群消费,Pub/Sub 提供广播消费 |
|
||||||
|
| 🚀 | Java 监控 | 基于 Spring Boot Admin 实现 Java 应用的监控 |
|
||||||
|
| 🚀 | 链路追踪 | 接入 SkyWalking 组件,实现链路追踪 |
|
||||||
|
| 🚀 | 日志中心 | 接入 SkyWalking 组件,实现日志中心 |
|
||||||
|
| 🚀 | 服务保障 | 基于 Redis 实现分布式锁、幂等、限流功能,满足高并发场景 |
|
||||||
|
| 🚀 | 日志服务 | 轻量级日志中心,查看远程服务器的日志 |
|
||||||
|
| 🚀 | 单元测试 | 基于 JUnit + Mockito 实现单元测试,保证功能的正确性、代码的质量等 |
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### 数据报表
|
||||||
|
|
||||||
|
| | 功能 | 描述 |
|
||||||
|
|-----|-------|--------------------|
|
||||||
|
| 🚀 | 报表设计器 | 支持数据报表、图形报表、打印设计等 |
|
||||||
|
| 🚀 | 大屏设计器 | 拖拽生成数据大屏,内置几十种图表组件 |
|
||||||
|
|
||||||
|
### 微信公众号
|
||||||
|
|
||||||
|
| | 功能 | 描述 |
|
||||||
|
|-----|--------|-------------------------------|
|
||||||
|
| 🚀 | 账号管理 | 配置接入的微信公众号,可支持多个公众号 |
|
||||||
|
| 🚀 | 数据统计 | 统计公众号的用户增减、累计用户、消息概况、接口分析等数据 |
|
||||||
|
| 🚀 | 粉丝管理 | 查看已关注、取关的粉丝列表,可对粉丝进行同步、打标签等操作 |
|
||||||
|
| 🚀 | 消息管理 | 查看粉丝发送的消息列表,可主动回复粉丝消息 |
|
||||||
|
| 🚀 | 自动回复 | 自动回复粉丝发送的消息,支持关注回复、消息回复、关键字回复 |
|
||||||
|
| 🚀 | 标签管理 | 对公众号的标签进行创建、查询、修改、删除等操作 |
|
||||||
|
| 🚀 | 菜单管理 | 自定义公众号的菜单,也可以从公众号同步菜单 |
|
||||||
|
| 🚀 | 素材管理 | 管理公众号的图片、语音、视频等素材,支持在线播放语音、视频 |
|
||||||
|
| 🚀 | 图文草稿箱 | 新增常用的图文素材到草稿箱,可发布到公众号 |
|
||||||
|
| 🚀 | 图文发表记录 | 查看已发布成功的图文素材,支持删除操作 |
|
||||||
|
|
||||||
|
### 商城系统
|
||||||
|
|
||||||
|
演示地址:<https://cloud.iocoder.cn/mall-preview/>
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### 会员中心
|
||||||
|
|
||||||
|
| | 功能 | 描述 |
|
||||||
|
|-----|------|----------------------------------|
|
||||||
|
| 🚀 | 会员管理 | 会员是 C 端的消费者,该功能用于会员的搜索与管理 |
|
||||||
|
| 🚀 | 会员标签 | 对会员的标签进行创建、查询、修改、删除等操作 |
|
||||||
|
| 🚀 | 会员等级 | 对会员的等级、成长值进行管理,可用于订单折扣等会员权益 |
|
||||||
|
| 🚀 | 会员分组 | 对会员进行分组,用于用户画像、内容推送等运营手段 |
|
||||||
|
| 🚀 | 积分签到 | 回馈给签到、消费等行为的积分,会员可订单抵现、积分兑换等途径消耗 |
|
||||||
|
|
||||||
|
### ERP 系统
|
||||||
|
|
||||||
|
演示地址:<https://cloud.iocoder.cn/erp-preview/>
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### CRM 系统
|
||||||
|
|
||||||
|
演示地址:<https://cloud.iocoder.cn/crm-preview/>
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### AI 大模型
|
||||||
|
|
||||||
|
演示地址:<https://cloud.iocoder.cn/ai-preview/>
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## 🐨 技术栈
|
||||||
|
|
||||||
|
### 微服务
|
||||||
|
|
||||||
|
| 项目 | 说明 |
|
||||||
|
|-----------------------|--------------------|
|
||||||
|
| `yudao-dependencies` | Maven 依赖版本管理 |
|
||||||
|
| `yudao-framework` | Java 框架拓展 |
|
||||||
|
| `yudao-server` | 管理后台 + 用户 APP 的服务端 |
|
||||||
|
| `yudao-module-system` | 系统功能的 Module 模块 |
|
||||||
|
| `yudao-module-member` | 会员中心的 Module 模块 |
|
||||||
|
| `yudao-module-infra` | 基础设施的 Module 模块 |
|
||||||
|
| `yudao-module-bpm` | 工作流程的 Module 模块 |
|
||||||
|
| `yudao-module-pay` | 支付系统的 Module 模块 |
|
||||||
|
| `yudao-module-mall` | 商城系统的 Module 模块 |
|
||||||
|
| `yudao-module-erp` | ERP 系统的 Module 模块 |
|
||||||
|
| `yudao-module-crm` | CRM 系统的 Module 模块 |
|
||||||
|
| `yudao-module-ai` | AI 大模型的 Module 模块 |
|
||||||
|
| `yudao-module-mp` | 微信公众号的 Module 模块 |
|
||||||
|
| `yudao-module-report` | 大屏报表 Module 模块 |
|
||||||
|
|
||||||
|
### 框架
|
||||||
|
|
||||||
|
| 框架 | 说明 | 版本 | 学习指南 |
|
||||||
|
|---------------------------------------------------------------------------------------------|------------------|------------|---------------------------------------------------------------------|
|
||||||
|
| [Spring Cloud Alibaba](https://github.com/alibaba/spring-cloud-alibaba) | 微服务框架 | 2023.0.1 | [文档](https://github.com/YunaiV/SpringBoot-Labs) |
|
||||||
|
| [Nacos](https://github.com/alibaba/nacos) | 配置中心 & 注册中心 | 2.3.2 | [文档](https://www.iocoder.cn/categories/Nacos/?yudao) |
|
||||||
|
| [RocketMQ](https://github.com/apache/rocketmq) | 消息队列 | 5.2.0 | [文档](https://www.iocoder.cn/categories/RocketMQ/?yudao) |
|
||||||
|
| [Sentinel](https://github.com/alibaba/sentinel) | 服务保障 | 1.8.6 | [文档](https://www.iocoder.cn/categories/Sentinel/?yudao) |
|
||||||
|
| [XXL Job](https://github.com/xuxueli/xxl-job) | 定时任务 | 2.4.0 | [文档](https://www.iocoder.cn/XXL-JOB/good-collection/?yudao) |
|
||||||
|
| [Spring Cloud Gateway](https://github.com/spring-cloud/spring-cloud-gateway) | 服务网关 | 4.1.0 | [文档](https://www.iocoder.cn/categories/Spring-Cloud-Gateway/?yudao) |
|
||||||
|
| [Seata](https://github.com/seata/seata) | 分布式事务 | 1.6.1 | [文档](https://www.iocoder.cn/categories/Seata/?yudao) |
|
||||||
|
| [MySQL](https://www.mysql.com/cn/) | 数据库服务器 | 5.7 / 8.0+ | |
|
||||||
|
| [Druid](https://github.com/alibaba/druid) | JDBC 连接池、监控组件 | 1.2.23 | [文档](http://www.iocoder.cn/Spring-Boot/datasource-pool/?yudao) |
|
||||||
|
| [MyBatis Plus](https://mp.baomidou.com/) | MyBatis 增强工具包 | 3.5.7 | [文档](http://www.iocoder.cn/Spring-Boot/MyBatis/?yudao) |
|
||||||
|
| [Dynamic Datasource](https://dynamic-datasource.com/) | 动态数据源 | 4.3.1 | [文档](http://www.iocoder.cn/Spring-Boot/datasource-pool/?yudao) |
|
||||||
|
| [Redis](https://redis.io/) | key-value 数据库 | 5.0 / 6.0 | |
|
||||||
|
| [Redisson](https://github.com/redisson/redisson) | Redis 客户端 | 3.32.0 | [文档](http://www.iocoder.cn/Spring-Boot/Redis/?yudao) |
|
||||||
|
| [Spring MVC](https://github.com/spring-projects/spring-framework/tree/master/spring-webmvc) | MVC 框架 | 6.1.10 | [文档](http://www.iocoder.cn/SpringMVC/MVC/?yudao) |
|
||||||
|
| [Spring Security](https://github.com/spring-projects/spring-security) | Spring 安全框架 | 6.3.1 | [文档](http://www.iocoder.cn/Spring-Boot/Spring-Security/?yudao) |
|
||||||
|
| [Hibernate Validator](https://github.com/hibernate/hibernate-validator) | 参数校验组件 | 8.0.1 | [文档](http://www.iocoder.cn/Spring-Boot/Validation/?yudao) |
|
||||||
|
| [Flowable](https://github.com/flowable/flowable-engine) | 工作流引擎 | 7.0.0 | [文档](https://doc.iocoder.cn/bpm/) |
|
||||||
|
| [Knife4j](https://gitee.com/xiaoym/knife4j) | Swagger 增强 UI 实现 | 4.5.0 | [文档](http://www.iocoder.cn/Spring-Boot/Swagger/?yudao) |
|
||||||
|
| [SkyWalking](https://skywalking.apache.org/) | 分布式应用追踪系统 | 9.0.0 | [文档](http://www.iocoder.cn/Spring-Boot/SkyWalking/?yudao) |
|
||||||
|
| [Spring Boot Admin](https://github.com/codecentric/spring-boot-admin) | Spring Boot 监控平台 | 3.6.1 | [文档](http://www.iocoder.cn/Spring-Boot/Admin/?yudao) |
|
||||||
|
| [Jackson](https://github.com/FasterXML/jackson) | JSON 工具库 | 2.17.1 | |
|
||||||
|
| [MapStruct](https://mapstruct.org/) | Java Bean 转换 | 1.6.3 | [文档](http://www.iocoder.cn/Spring-Boot/MapStruct/?yudao) |
|
||||||
|
| [Lombok](https://projectlombok.org/) | 消除冗长的 Java 代码 | 1.18.34 | [文档](http://www.iocoder.cn/Spring-Boot/Lombok/?yudao) |
|
||||||
|
| [JUnit](https://junit.org/junit5/) | Java 单元测试框架 | 5.10.1 | - |
|
||||||
|
| [Mockito](https://github.com/mockito/mockito) | Java Mock 框架 | 5.7.0 | - |
|
||||||
|
|
||||||
|
## 🐷 演示图
|
||||||
|
|
||||||
|
### 系统功能
|
||||||
|
|
||||||
|
| 模块 | biu | biu | biu |
|
||||||
|
|----------|-----------------------------|---------------------------|--------------------------|
|
||||||
|
| 登录 & 首页 |  |  |  |
|
||||||
|
| 用户 & 应用 |  |  |  |
|
||||||
|
| 租户 & 套餐 |  |  | - |
|
||||||
|
| 部门 & 岗位 |  |  | - |
|
||||||
|
| 菜单 & 角色 |  |  | - |
|
||||||
|
| 审计日志 |  |  | - |
|
||||||
|
| 短信 |  |  |  |
|
||||||
|
| 字典 & 敏感词 |  |  |  |
|
||||||
|
| 错误码 & 通知 |  |  | - |
|
||||||
|
|
||||||
|
### 工作流程
|
||||||
|
|
||||||
|
| 模块 | biu | biu | biu |
|
||||||
|
|---------|---------------------------------|---------------------------------|---------------------------------|
|
||||||
|
| 流程模型 |  |  |  |
|
||||||
|
| 表单 & 分组 |  |  | - |
|
||||||
|
| 我的流程 |  |  |  |
|
||||||
|
| 待办 & 已办 |  |  |  |
|
||||||
|
| OA 请假 |  |  |  |
|
||||||
|
|
||||||
|
### 基础设施
|
||||||
|
|
||||||
|
| 模块 | biu | biu | biu |
|
||||||
|
|---------------|-------------------------------|-----------------------------|---------------------------|
|
||||||
|
| 代码生成 |  |  | - |
|
||||||
|
| 文档 |  |  | - |
|
||||||
|
| 文件 & 配置 |  |  |  |
|
||||||
|
| 定时任务 |  |  | - |
|
||||||
|
| API 日志 |  |  | - |
|
||||||
|
| MySQL & Redis |  |  | - |
|
||||||
|
| 监控平台 |  |  |  |
|
||||||
|
|
||||||
|
### 支付系统
|
||||||
|
|
||||||
|
| 模块 | biu | biu | biu |
|
||||||
|
|---------|---------------------------|---------------------------------|---------------------------------|
|
||||||
|
| 商家 & 应用 |  |  |  |
|
||||||
|
| 支付 & 退款 |  |  | --- |
|
||||||
|
### 数据报表
|
||||||
|
|
||||||
|
| 模块 | biu | biu | biu |
|
||||||
|
|-------|---------------------------------|---------------------------------|---------------------------------------|
|
||||||
|
| 报表设计器 |  |  |  |
|
||||||
|
| 大屏设计器 |  |  |  |
|
||||||
|
|
||||||
|
### 移动端(管理后台)
|
||||||
|
|
||||||
|
| biu | biu | biu |
|
||||||
|
|----------------------------------|----------------------------------|----------------------------------|
|
||||||
|
|  |  |  |
|
||||||
|
|  |  |  |
|
||||||
|
|  |  |  |
|
||||||
|
|
||||||
|
目前已经实现登录、我的、工作台、编辑资料、头像修改、密码修改、常见问题、关于我们等基础功能。
|
||||||
|
|||||||
4
lombok.config
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
config.stopBubbling = true
|
||||||
|
lombok.tostring.callsuper=CALL
|
||||||
|
lombok.equalsandhashcode.callsuper=CALL
|
||||||
|
lombok.accessors.chain=true
|
||||||
168
pom.xml
Normal file
@@ -0,0 +1,168 @@
|
|||||||
|
<?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">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>cn.iocoder.cloud</groupId>
|
||||||
|
<artifactId>yudao</artifactId>
|
||||||
|
<version>${revision}</version>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<modules>
|
||||||
|
<module>yudao-dependencies</module>
|
||||||
|
<module>yudao-gateway</module>
|
||||||
|
<module>yudao-framework</module>
|
||||||
|
<!-- Server 主项目 -->
|
||||||
|
<module>yudao-server</module>
|
||||||
|
<!-- 各种 module 拓展 -->
|
||||||
|
<module>yudao-module-system</module>
|
||||||
|
<module>yudao-module-infra</module>
|
||||||
|
<!-- <module>yudao-module-member</module>-->
|
||||||
|
<module>yudao-module-bpm</module>
|
||||||
|
<!-- <module>yudao-module-pay</module>-->
|
||||||
|
<module>yudao-module-report</module>
|
||||||
|
<!-- <module>yudao-module-mp</module>-->
|
||||||
|
<!-- <module>yudao-module-mall</module>-->
|
||||||
|
<!-- <module>yudao-module-crm</module>-->
|
||||||
|
<!-- <module>yudao-module-erp</module>-->
|
||||||
|
<module>yudao-module-ai</module>
|
||||||
|
<!-- <module>yudao-module-iot</module>-->
|
||||||
|
</modules>
|
||||||
|
|
||||||
|
<name>${project.artifactId}</name>
|
||||||
|
<description>芋道项目基础脚手架</description>
|
||||||
|
<url>https://github.com/YunaiV/ruoyi-vue-pro</url>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<revision>2.6.0-SNAPSHOT</revision>
|
||||||
|
<!-- Maven 相关 -->
|
||||||
|
<java.version>17</java.version>
|
||||||
|
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||||
|
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||||
|
<maven-surefire-plugin.version>3.2.2</maven-surefire-plugin.version>
|
||||||
|
<maven-compiler-plugin.version>3.14.0</maven-compiler-plugin.version>
|
||||||
|
<flatten-maven-plugin.version>1.6.0</flatten-maven-plugin.version>
|
||||||
|
<!-- 看看咋放到 bom 里 -->
|
||||||
|
<lombok.version>1.18.36</lombok.version>
|
||||||
|
<spring.boot.version>3.5.0</spring.boot.version>
|
||||||
|
<mapstruct.version>1.6.3</mapstruct.version>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencyManagement>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.iocoder.cloud</groupId>
|
||||||
|
<artifactId>yudao-dependencies</artifactId>
|
||||||
|
<version>${revision}</version>
|
||||||
|
<type>pom</type>
|
||||||
|
<scope>import</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</dependencyManagement>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<pluginManagement>
|
||||||
|
<plugins>
|
||||||
|
<!-- maven-surefire-plugin 插件,用于运行单元测试。 -->
|
||||||
|
<!-- 注意,需要使用 3.0.X+,因为要支持 Junit 5 版本 -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<version>${maven-surefire-plugin.version}</version>
|
||||||
|
</plugin>
|
||||||
|
<!-- maven-compiler-plugin 插件,解决 Lombok + MapStruct 组合 -->
|
||||||
|
<!-- https://stackoverflow.com/questions/33483697/re-run-spring-boot-configuration-annotation-processor-to-update-generated-metada -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>${maven-compiler-plugin.version}</version>
|
||||||
|
<configuration>
|
||||||
|
<annotationProcessorPaths>
|
||||||
|
<path>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||||
|
<version>${spring.boot.version}</version>
|
||||||
|
</path>
|
||||||
|
<path>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
<version>${lombok.version}</version>
|
||||||
|
</path>
|
||||||
|
<path>
|
||||||
|
<groupId>org.mapstruct</groupId>
|
||||||
|
<artifactId>mapstruct-processor</artifactId>
|
||||||
|
<version>${mapstruct.version}</version>
|
||||||
|
</path>
|
||||||
|
</annotationProcessorPaths>
|
||||||
|
<!-- 编译参数写在 arg 内,解决 Spring Boot 3.2 的 Parameter Name Discovery 问题 -->
|
||||||
|
<debug>false</debug>
|
||||||
|
<compilerArgs>
|
||||||
|
<arg>-parameters</arg>
|
||||||
|
</compilerArgs>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</pluginManagement>
|
||||||
|
|
||||||
|
<plugins>
|
||||||
|
<!-- 统一 revision 版本 -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>flatten-maven-plugin</artifactId>
|
||||||
|
<version>${flatten-maven-plugin.version}</version>
|
||||||
|
<configuration>
|
||||||
|
<flattenMode>oss</flattenMode>
|
||||||
|
<updatePomFile>true</updatePomFile>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>flatten</goal>
|
||||||
|
</goals>
|
||||||
|
<id>flatten</id>
|
||||||
|
<phase>process-resources</phase>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>clean</goal>
|
||||||
|
</goals>
|
||||||
|
<id>flatten.clean</id>
|
||||||
|
<phase>clean</phase>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<!-- 使用 huawei / aliyun 的 Maven 源,提升下载速度 -->
|
||||||
|
<repositories>
|
||||||
|
<repository>
|
||||||
|
<id>huaweicloud</id>
|
||||||
|
<name>huawei</name>
|
||||||
|
<url>https://mirrors.huaweicloud.com/repository/maven/</url>
|
||||||
|
</repository>
|
||||||
|
<repository>
|
||||||
|
<id>aliyunmaven</id>
|
||||||
|
<name>aliyun</name>
|
||||||
|
<url>https://maven.aliyun.com/repository/public</url>
|
||||||
|
</repository>
|
||||||
|
|
||||||
|
<repository>
|
||||||
|
<id>spring-milestones</id>
|
||||||
|
<name>Spring Milestones</name>
|
||||||
|
<url>https://repo.spring.io/milestone</url>
|
||||||
|
<snapshots>
|
||||||
|
<enabled>false</enabled>
|
||||||
|
</snapshots>
|
||||||
|
</repository>
|
||||||
|
<repository>
|
||||||
|
<id>spring-snapshots</id>
|
||||||
|
<name>Spring Snapshots</name>
|
||||||
|
<url>https://repo.spring.io/snapshot</url>
|
||||||
|
<releases>
|
||||||
|
<enabled>false</enabled>
|
||||||
|
</releases>
|
||||||
|
</repository>
|
||||||
|
</repositories>
|
||||||
|
|
||||||
|
</project>
|
||||||
162
script/docker/docker-compose.yml
Normal file
@@ -0,0 +1,162 @@
|
|||||||
|
version: '3'
|
||||||
|
services:
|
||||||
|
yudao-gateway:
|
||||||
|
image: yudao-gateway
|
||||||
|
container_name: yudao-gateway
|
||||||
|
environment:
|
||||||
|
- TZ=Asia/Shanghai # 配置程序默认时区为上海(中国标准时间)
|
||||||
|
- JAVA_TOOL_OPTIONS=-javaagent:/data/skywalking/skywalking-agent/skywalking-agent.jar # 配置skywalking
|
||||||
|
- SW_AGENT_NAME=yudao-gateway
|
||||||
|
- SW_AGENT_TRACE_IGNORE_PATH=Redisson/PING,/actuator/**,/admin/**
|
||||||
|
- SW_AGENT_COLLECTOR_BACKEND_SERVICES=[YOUR_SKYWALKING_ADDR] # 请替换 your.skywalking.addr 为你的 skywalking 地址
|
||||||
|
- SPRING_PROFILES_ACTIVE=test # 指定程序运行环境
|
||||||
|
- SPRING_CLOUD_NACOS_CONFIG_SERVER_ADDR=[YOUR_NACOS_ADDR] # 配置中心地址
|
||||||
|
- SPRING_CLOUD_NACOS_CONFIG_NAMESPACE=[YOUR_NAMESPACE] # 命名空间
|
||||||
|
- SPRING_CLOUD_NACOS_SERVER_ADDR=[YOUR_NACOS_ADDR] # 注册中心地址
|
||||||
|
- SPRING_CLOUD_NACOS_DISCOVERY_NAMESPACE=[YOUR_NAMESPACE] # 命名空间
|
||||||
|
volumes:
|
||||||
|
- /docker/yudao-cloud/logs:/root/logs/
|
||||||
|
- /data/skywalking/skywalking-agent:/data/skywalking/skywalking-agent
|
||||||
|
restart: always
|
||||||
|
network_mode: host # 以主机网络环境运行
|
||||||
|
yudao-system:
|
||||||
|
image: yudao-module-system-biz
|
||||||
|
container_name: yudao-system
|
||||||
|
environment:
|
||||||
|
- TZ=Asia/Shanghai # 配置程序默认时区为上海(中国标准时间)
|
||||||
|
- JAVA_TOOL_OPTIONS=-javaagent:/data/skywalking/skywalking-agent/skywalking-agent.jar # 配置skywalking
|
||||||
|
- SW_AGENT_NAME=yudao-gateway
|
||||||
|
- SW_AGENT_TRACE_IGNORE_PATH=Redisson/PING,/actuator/**,/admin/**
|
||||||
|
- SW_AGENT_COLLECTOR_BACKEND_SERVICES=[YOUR_SKYWALKING_ADDR] # 请替换 your.skywalking.addr 为你的 skywalking 地址
|
||||||
|
- SPRING_PROFILES_ACTIVE=test # 指定程序运行环境
|
||||||
|
- SPRING_CLOUD_NACOS_CONFIG_SERVER_ADDR=[YOUR_NACOS_ADDR] # 配置中心地址
|
||||||
|
- SPRING_CLOUD_NACOS_CONFIG_NAMESPACE=[YOUR_NAMESPACE] # 命名空间
|
||||||
|
- SPRING_CLOUD_NACOS_SERVER_ADDR=[YOUR_NACOS_ADDR] # 注册中心地址
|
||||||
|
- SPRING_CLOUD_NACOS_DISCOVERY_NAMESPACE=[YOUR_NAMESPACE] # 命名空间
|
||||||
|
volumes:
|
||||||
|
- /docker/yudao-cloud/logs:/root/logs/
|
||||||
|
- /data/skywalking/skywalking-agent:/data/skywalking/skywalking-agent
|
||||||
|
healthcheck:
|
||||||
|
test: [ "CMD","curl","-f","http://localhost:48081" ]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 5
|
||||||
|
start_period: 60s
|
||||||
|
restart: always
|
||||||
|
network_mode: host
|
||||||
|
yudao-infra:
|
||||||
|
image: yudao-module-infra-biz
|
||||||
|
container_name: yudao-infra
|
||||||
|
environment:
|
||||||
|
- TZ=Asia/Shanghai # 配置程序默认时区为上海(中国标准时间)
|
||||||
|
- JAVA_TOOL_OPTIONS=-javaagent:/data/skywalking/skywalking-agent/skywalking-agent.jar # 配置skywalking
|
||||||
|
- SW_AGENT_NAME=yudao-gateway
|
||||||
|
- SW_AGENT_TRACE_IGNORE_PATH=Redisson/PING,/actuator/**,/admin/**
|
||||||
|
- SW_AGENT_COLLECTOR_BACKEND_SERVICES=[YOUR_SKYWALKING_ADDR] # 请替换 your.skywalking.addr 为你的 skywalking 地址
|
||||||
|
- SPRING_PROFILES_ACTIVE=test # 指定程序运行环境
|
||||||
|
- SPRING_CLOUD_NACOS_CONFIG_SERVER_ADDR=[YOUR_NACOS_ADDR] # 配置中心地址
|
||||||
|
- SPRING_CLOUD_NACOS_CONFIG_NAMESPACE=[YOUR_NAMESPACE] # 命名空间
|
||||||
|
- SPRING_CLOUD_NACOS_SERVER_ADDR=[YOUR_NACOS_ADDR] # 注册中心地址
|
||||||
|
- SPRING_CLOUD_NACOS_DISCOVERY_NAMESPACE=[YOUR_NAMESPACE] # 命名空间
|
||||||
|
volumes:
|
||||||
|
- /docker/yudao-cloud/logs:/root/logs/
|
||||||
|
- /data/skywalking/skywalking-agent:/data/skywalking/skywalking-agent
|
||||||
|
restart: always
|
||||||
|
network_mode: host
|
||||||
|
healthcheck:
|
||||||
|
test: [ "CMD","curl","-f","http://localhost:48082" ]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 5
|
||||||
|
start_period: 60s
|
||||||
|
depends_on:
|
||||||
|
yudao-system:
|
||||||
|
condition: service_healthy
|
||||||
|
yudao-report:
|
||||||
|
image: yudao-module-report-biz
|
||||||
|
container_name: yudao-report
|
||||||
|
environment:
|
||||||
|
- TZ=Asia/Shanghai # 配置程序默认时区为上海(中国标准时间)
|
||||||
|
- JAVA_TOOL_OPTIONS=-javaagent:/data/skywalking/skywalking-agent/skywalking-agent.jar # 配置skywalking
|
||||||
|
- SW_AGENT_NAME=yudao-gateway
|
||||||
|
- SW_AGENT_TRACE_IGNORE_PATH=Redisson/PING,/actuator/**,/admin/**
|
||||||
|
- SW_AGENT_COLLECTOR_BACKEND_SERVICES=[YOUR_SKYWALKING_ADDR] # 请替换 your.skywalking.addr 为你的 skywalking 地址
|
||||||
|
- SPRING_PROFILES_ACTIVE=test # 指定程序运行环境
|
||||||
|
- SPRING_CLOUD_NACOS_CONFIG_SERVER_ADDR=[YOUR_NACOS_ADDR] # 配置中心地址
|
||||||
|
- SPRING_CLOUD_NACOS_CONFIG_NAMESPACE=[YOUR_NAMESPACE] # 命名空间
|
||||||
|
- SPRING_CLOUD_NACOS_SERVER_ADDR=[YOUR_NACOS_ADDR] # 注册中心地址
|
||||||
|
- SPRING_CLOUD_NACOS_DISCOVERY_NAMESPACE=[YOUR_NAMESPACE] # 命名空间
|
||||||
|
volumes:
|
||||||
|
- /docker/yudao-cloud/logs:/root/logs/
|
||||||
|
- /data/skywalking/skywalking-agent:/data/skywalking/skywalking-agent
|
||||||
|
restart: always
|
||||||
|
network_mode: host
|
||||||
|
depends_on:
|
||||||
|
yudao-infra:
|
||||||
|
condition: service_healthy
|
||||||
|
yudao-bpm:
|
||||||
|
image: yudao-module-bpm-biz
|
||||||
|
container_name: yudao-bpm
|
||||||
|
environment:
|
||||||
|
- TZ=Asia/Shanghai # 配置程序默认时区为上海(中国标准时间)
|
||||||
|
- JAVA_TOOL_OPTIONS=-javaagent:/data/skywalking/skywalking-agent/skywalking-agent.jar # 配置skywalking
|
||||||
|
- SW_AGENT_NAME=yudao-gateway
|
||||||
|
- SW_AGENT_TRACE_IGNORE_PATH=Redisson/PING,/actuator/**,/admin/**
|
||||||
|
- SW_AGENT_COLLECTOR_BACKEND_SERVICES=[YOUR_SKYWALKING_ADDR] # 请替换 your.skywalking.addr 为你的 skywalking 地址
|
||||||
|
- SPRING_PROFILES_ACTIVE=test # 指定程序运行环境
|
||||||
|
- SPRING_CLOUD_NACOS_CONFIG_SERVER_ADDR=[YOUR_NACOS_ADDR] # 配置中心地址
|
||||||
|
- SPRING_CLOUD_NACOS_CONFIG_NAMESPACE=[YOUR_NAMESPACE] # 命名空间
|
||||||
|
- SPRING_CLOUD_NACOS_SERVER_ADDR=[YOUR_NACOS_ADDR] # 注册中心地址
|
||||||
|
- SPRING_CLOUD_NACOS_DISCOVERY_NAMESPACE=[YOUR_NAMESPACE] # 命名空间
|
||||||
|
volumes:
|
||||||
|
- /docker/yudao-cloud/logs:/root/logs/
|
||||||
|
- /data/skywalking/skywalking-agent:/data/skywalking/skywalking-agent
|
||||||
|
restart: always
|
||||||
|
network_mode: host
|
||||||
|
depends_on:
|
||||||
|
yudao-infra:
|
||||||
|
condition: service_healthy
|
||||||
|
yudao-pay:
|
||||||
|
image: yudao-module-pay-biz
|
||||||
|
container_name: yudao-pay
|
||||||
|
environment:
|
||||||
|
- TZ=Asia/Shanghai # 配置程序默认时区为上海(中国标准时间)
|
||||||
|
- JAVA_TOOL_OPTIONS=-javaagent:/data/skywalking/skywalking-agent/skywalking-agent.jar # 配置skywalking
|
||||||
|
- SW_AGENT_NAME=yudao-gateway
|
||||||
|
- SW_AGENT_TRACE_IGNORE_PATH=Redisson/PING,/actuator/**,/admin/**
|
||||||
|
- SW_AGENT_COLLECTOR_BACKEND_SERVICES=[YOUR_SKYWALKING_ADDR] # 请替换 your.skywalking.addr 为你的 skywalking 地址
|
||||||
|
- SPRING_PROFILES_ACTIVE=test # 指定程序运行环境
|
||||||
|
- SPRING_CLOUD_NACOS_CONFIG_SERVER_ADDR=[YOUR_NACOS_ADDR] # 配置中心地址
|
||||||
|
- SPRING_CLOUD_NACOS_CONFIG_NAMESPACE=[YOUR_NAMESPACE] # 命名空间
|
||||||
|
- SPRING_CLOUD_NACOS_SERVER_ADDR=[YOUR_NACOS_ADDR] # 注册中心地址
|
||||||
|
- SPRING_CLOUD_NACOS_DISCOVERY_NAMESPACE=[YOUR_NAMESPACE] # 命名空间
|
||||||
|
volumes:
|
||||||
|
- /docker/yudao-cloud/logs:/root/logs/
|
||||||
|
- /data/skywalking/skywalking-agent:/data/skywalking/skywalking-agent
|
||||||
|
restart: always
|
||||||
|
network_mode: host
|
||||||
|
depends_on:
|
||||||
|
yudao-infra:
|
||||||
|
condition: service_healthy
|
||||||
|
yudao-mp:
|
||||||
|
image: yudao-module-mp-biz
|
||||||
|
container_name: yudao-mp
|
||||||
|
environment:
|
||||||
|
- TZ=Asia/Shanghai # 配置程序默认时区为上海(中国标准时间)
|
||||||
|
- JAVA_TOOL_OPTIONS=-javaagent:/data/skywalking/skywalking-agent/skywalking-agent.jar # 配置skywalking
|
||||||
|
- SW_AGENT_NAME=yudao-gateway
|
||||||
|
- SW_AGENT_TRACE_IGNORE_PATH=Redisson/PING,/actuator/**,/admin/**
|
||||||
|
- SW_AGENT_COLLECTOR_BACKEND_SERVICES=[YOUR_SKYWALKING_ADDR] # 请替换 your.skywalking.addr 为你的 skywalking 地址
|
||||||
|
- SPRING_PROFILES_ACTIVE=test # 指定程序运行环境
|
||||||
|
- SPRING_CLOUD_NACOS_CONFIG_SERVER_ADDR=[YOUR_NACOS_ADDR] # 配置中心地址
|
||||||
|
- SPRING_CLOUD_NACOS_CONFIG_NAMESPACE=[YOUR_NAMESPACE] # 命名空间
|
||||||
|
- SPRING_CLOUD_NACOS_SERVER_ADDR=[YOUR_NACOS_ADDR] # 注册中心地址
|
||||||
|
- SPRING_CLOUD_NACOS_DISCOVERY_NAMESPACE=[YOUR_NAMESPACE] # 命名空间
|
||||||
|
volumes:
|
||||||
|
- /docker/yudao-cloud/logs:/root/logs/
|
||||||
|
- /data/skywalking/skywalking-agent:/data/skywalking/skywalking-agent
|
||||||
|
restart: always
|
||||||
|
network_mode: host
|
||||||
|
depends_on:
|
||||||
|
yudao-infra:
|
||||||
|
condition: service_healthy
|
||||||
28
script/idea/http-client.env.json
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"local": {
|
||||||
|
"baseUrl": "http://127.0.0.1:48080/admin-api",
|
||||||
|
"systemBaseUrl": "http://127.0.0.1:48081/admin-api",
|
||||||
|
"infaBaseUrl": "http://127.0.0.1:48082/admin-api",
|
||||||
|
|
||||||
|
"token": "test1",
|
||||||
|
"adminTenantId": "1",
|
||||||
|
"tag": "${HOSTNAME}",
|
||||||
|
|
||||||
|
"appApi": "http://127.0.0.1:48080/app-api",
|
||||||
|
"appToken": "test1",
|
||||||
|
"appTenentId": "1"
|
||||||
|
},
|
||||||
|
"gateway": {
|
||||||
|
"baseUrl": "http://127.0.0.1:48080/admin-api",
|
||||||
|
"systemBaseUrl": "http://127.0.0.1:48080/admin-api",
|
||||||
|
"infaBaseUrl": "http://127.0.0.1:48080/admin-api",
|
||||||
|
|
||||||
|
"token": "test1",
|
||||||
|
"adminTenantId": "1",
|
||||||
|
"tag": "${HOSTNAME}",
|
||||||
|
|
||||||
|
"appApi": "http://127.0.0.1:8888/app-api",
|
||||||
|
"appToken": "test1",
|
||||||
|
"appTenentId": "1"
|
||||||
|
}
|
||||||
|
}
|
||||||
3
sql/db2/README.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
暂未适配 IBM DB2 数据库,如果你有需要,可以微信联系 wangwenbin-server 一起建设。
|
||||||
|
|
||||||
|
你需要把表结构与数据导入到 DM 数据库,我来测试与适配代码。
|
||||||
@@ -0,0 +1,598 @@
|
|||||||
|
package liquibase.database.core;
|
||||||
|
|
||||||
|
import java.lang.reflect.Method;
|
||||||
|
import java.sql.Connection;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.sql.Statement;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Properties;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.regex.Matcher;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
import liquibase.CatalogAndSchema;
|
||||||
|
import liquibase.Scope;
|
||||||
|
import liquibase.database.AbstractJdbcDatabase;
|
||||||
|
import liquibase.database.DatabaseConnection;
|
||||||
|
import liquibase.database.OfflineConnection;
|
||||||
|
import liquibase.database.jvm.JdbcConnection;
|
||||||
|
import liquibase.exception.DatabaseException;
|
||||||
|
import liquibase.exception.UnexpectedLiquibaseException;
|
||||||
|
import liquibase.exception.ValidationErrors;
|
||||||
|
import liquibase.executor.ExecutorService;
|
||||||
|
import liquibase.statement.DatabaseFunction;
|
||||||
|
import liquibase.statement.SequenceCurrentValueFunction;
|
||||||
|
import liquibase.statement.SequenceNextValueFunction;
|
||||||
|
import liquibase.statement.core.RawCallStatement;
|
||||||
|
import liquibase.statement.core.RawSqlStatement;
|
||||||
|
import liquibase.structure.DatabaseObject;
|
||||||
|
import liquibase.structure.core.Catalog;
|
||||||
|
import liquibase.structure.core.Index;
|
||||||
|
import liquibase.structure.core.PrimaryKey;
|
||||||
|
import liquibase.structure.core.Schema;
|
||||||
|
import liquibase.util.JdbcUtils;
|
||||||
|
import liquibase.util.StringUtil;
|
||||||
|
|
||||||
|
public class DmDatabase extends AbstractJdbcDatabase {
|
||||||
|
private static final String PRODUCT_NAME = "DM DBMS";
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String getDefaultDatabaseProductName() {
|
||||||
|
return PRODUCT_NAME;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Is this AbstractDatabase subclass the correct one to use for the given connection.
|
||||||
|
*
|
||||||
|
* @param conn
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean isCorrectDatabaseImplementation(DatabaseConnection conn) throws DatabaseException {
|
||||||
|
return PRODUCT_NAME.equalsIgnoreCase(conn.getDatabaseProductName());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If this database understands the given url, return the default driver class name. Otherwise return null.
|
||||||
|
*
|
||||||
|
* @param url
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String getDefaultDriver(String url) {
|
||||||
|
if(url.startsWith("jdbc:dm")) {
|
||||||
|
return "dm.jdbc.driver.DmDriver";
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns an all-lower-case short name of the product. Used for end-user selecting of database type
|
||||||
|
* such as the DBMS precondition.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String getShortName() {
|
||||||
|
return "dm";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer getDefaultPort() {
|
||||||
|
return 5236;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns whether this database support initially deferrable columns.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean supportsInitiallyDeferrableColumns() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean supportsTablespaces() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return PRIORITY_DEFAULT;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final Pattern PROXY_USER = Pattern.compile(".*(?:thin|oci)\\:(.+)/@.*");
|
||||||
|
|
||||||
|
protected final int SHORT_IDENTIFIERS_LENGTH = 30;
|
||||||
|
protected final int LONG_IDENTIFIERS_LEGNTH = 128;
|
||||||
|
public static final int ORACLE_12C_MAJOR_VERSION = 12;
|
||||||
|
|
||||||
|
private Set<String> reservedWords = new HashSet<>();
|
||||||
|
private Set<String> userDefinedTypes;
|
||||||
|
private Map<String, String> savedSessionNlsSettings;
|
||||||
|
|
||||||
|
private Boolean canAccessDbaRecycleBin;
|
||||||
|
private Integer databaseMajorVersion;
|
||||||
|
private Integer databaseMinorVersion;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default constructor for an object that represents the Oracle Database DBMS.
|
||||||
|
*/
|
||||||
|
public DmDatabase() {
|
||||||
|
super.unquotedObjectsAreUppercased = true;
|
||||||
|
//noinspection HardCodedStringLiteral
|
||||||
|
super.setCurrentDateTimeFunction("SYSTIMESTAMP");
|
||||||
|
// Setting list of Oracle's native functions
|
||||||
|
//noinspection HardCodedStringLiteral
|
||||||
|
dateFunctions.add(new DatabaseFunction("SYSDATE"));
|
||||||
|
//noinspection HardCodedStringLiteral
|
||||||
|
dateFunctions.add(new DatabaseFunction("SYSTIMESTAMP"));
|
||||||
|
//noinspection HardCodedStringLiteral
|
||||||
|
dateFunctions.add(new DatabaseFunction("CURRENT_TIMESTAMP"));
|
||||||
|
//noinspection HardCodedStringLiteral
|
||||||
|
super.sequenceNextValueFunction = "%s.nextval";
|
||||||
|
//noinspection HardCodedStringLiteral
|
||||||
|
super.sequenceCurrentValueFunction = "%s.currval";
|
||||||
|
}
|
||||||
|
|
||||||
|
private void tryProxySession(final String url, final Connection con) {
|
||||||
|
Matcher m = PROXY_USER.matcher(url);
|
||||||
|
if (m.matches()) {
|
||||||
|
Properties props = new Properties();
|
||||||
|
props.put("PROXY_USER_NAME", m.group(1));
|
||||||
|
try {
|
||||||
|
Method method = con.getClass().getMethod("openProxySession", int.class, Properties.class);
|
||||||
|
method.setAccessible(true);
|
||||||
|
method.invoke(con, 1, props);
|
||||||
|
} catch (Exception e) {
|
||||||
|
Scope.getCurrentScope().getLog(getClass()).info("Could not open proxy session on OracleDatabase: " + e.getCause().getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getDatabaseMajorVersion() throws DatabaseException {
|
||||||
|
if (databaseMajorVersion == null) {
|
||||||
|
return super.getDatabaseMajorVersion();
|
||||||
|
} else {
|
||||||
|
return databaseMajorVersion;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getDatabaseMinorVersion() throws DatabaseException {
|
||||||
|
if (databaseMinorVersion == null) {
|
||||||
|
return super.getDatabaseMinorVersion();
|
||||||
|
} else {
|
||||||
|
return databaseMinorVersion;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getJdbcCatalogName(CatalogAndSchema schema) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getJdbcSchemaName(CatalogAndSchema schema) {
|
||||||
|
return correctObjectName((schema.getCatalogName() == null) ? schema.getSchemaName() : schema.getCatalogName(), Schema.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String getAutoIncrementClause(final String generationType, final Boolean defaultOnNull) {
|
||||||
|
if (StringUtil.isEmpty(generationType)) {
|
||||||
|
return super.getAutoIncrementClause();
|
||||||
|
}
|
||||||
|
|
||||||
|
String autoIncrementClause = "GENERATED %s AS IDENTITY"; // %s -- [ ALWAYS | BY DEFAULT [ ON NULL ] ]
|
||||||
|
String generationStrategy = generationType;
|
||||||
|
if (Boolean.TRUE.equals(defaultOnNull) && generationType.toUpperCase().equals("BY DEFAULT")) {
|
||||||
|
generationStrategy += " ON NULL";
|
||||||
|
}
|
||||||
|
return String.format(autoIncrementClause, generationStrategy);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String generatePrimaryKeyName(String tableName) {
|
||||||
|
if (tableName.length() > 27) {
|
||||||
|
//noinspection HardCodedStringLiteral
|
||||||
|
return "PK_" + tableName.toUpperCase(Locale.US).substring(0, 27);
|
||||||
|
} else {
|
||||||
|
//noinspection HardCodedStringLiteral
|
||||||
|
return "PK_" + tableName.toUpperCase(Locale.US);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isReservedWord(String objectName) {
|
||||||
|
return reservedWords.contains(objectName.toUpperCase());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean supportsSequences() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Oracle supports catalogs in liquibase terms
|
||||||
|
*
|
||||||
|
* @return false
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean supportsSchemas() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String getConnectionCatalogName() throws DatabaseException {
|
||||||
|
if (getConnection() instanceof OfflineConnection) {
|
||||||
|
return getConnection().getCatalog();
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
//noinspection HardCodedStringLiteral
|
||||||
|
return Scope.getCurrentScope().getSingleton(ExecutorService.class).getExecutor("jdbc", this).queryForObject(new RawCallStatement("select sys_context( 'userenv', 'current_schema' ) from dual"), String.class);
|
||||||
|
} catch (Exception e) {
|
||||||
|
//noinspection HardCodedStringLiteral
|
||||||
|
Scope.getCurrentScope().getLog(getClass()).info("Error getting default schema", e);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getDefaultCatalogName() {//NOPMD
|
||||||
|
return (super.getDefaultCatalogName() == null) ? null : super.getDefaultCatalogName().toUpperCase(Locale.US);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Returns an Oracle date literal with the same value as a string formatted using ISO 8601.</p>
|
||||||
|
*
|
||||||
|
* <p>Convert an ISO8601 date string to one of the following results:
|
||||||
|
* to_date('1995-05-23', 'YYYY-MM-DD')
|
||||||
|
* to_date('1995-05-23 09:23:59', 'YYYY-MM-DD HH24:MI:SS')</p>
|
||||||
|
* <p>
|
||||||
|
* Implementation restriction:<br>
|
||||||
|
* Currently, only the following subsets of ISO8601 are supported:<br>
|
||||||
|
* <ul>
|
||||||
|
* <li>YYYY-MM-DD</li>
|
||||||
|
* <li>YYYY-MM-DDThh:mm:ss</li>
|
||||||
|
* </ul>
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String getDateLiteral(String isoDate) {
|
||||||
|
String normalLiteral = super.getDateLiteral(isoDate);
|
||||||
|
|
||||||
|
if (isDateOnly(isoDate)) {
|
||||||
|
return "TO_DATE(" + normalLiteral + ", 'YYYY-MM-DD')";
|
||||||
|
} else if (isTimeOnly(isoDate)) {
|
||||||
|
return "TO_DATE(" + normalLiteral + ", 'HH24:MI:SS')";
|
||||||
|
} else if (isTimestamp(isoDate)) {
|
||||||
|
return "TO_TIMESTAMP(" + normalLiteral + ", 'YYYY-MM-DD HH24:MI:SS.FF')";
|
||||||
|
} else if (isDateTime(isoDate)) {
|
||||||
|
int seppos = normalLiteral.lastIndexOf('.');
|
||||||
|
if (seppos != -1) {
|
||||||
|
normalLiteral = normalLiteral.substring(0, seppos) + "'";
|
||||||
|
}
|
||||||
|
return "TO_DATE(" + normalLiteral + ", 'YYYY-MM-DD HH24:MI:SS')";
|
||||||
|
}
|
||||||
|
return "UNSUPPORTED:" + isoDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isSystemObject(DatabaseObject example) {
|
||||||
|
if (example == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.isLiquibaseObject(example)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (example instanceof Schema) {
|
||||||
|
//noinspection HardCodedStringLiteral,HardCodedStringLiteral,HardCodedStringLiteral,HardCodedStringLiteral
|
||||||
|
if ("SYSTEM".equals(example.getName()) || "SYS".equals(example.getName()) || "CTXSYS".equals(example.getName()) || "XDB".equals(example.getName())) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
//noinspection HardCodedStringLiteral,HardCodedStringLiteral,HardCodedStringLiteral,HardCodedStringLiteral
|
||||||
|
if ("SYSTEM".equals(example.getSchema().getCatalogName()) || "SYS".equals(example.getSchema().getCatalogName()) || "CTXSYS".equals(example.getSchema().getCatalogName()) || "XDB".equals(example.getSchema().getCatalogName())) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
} else if (isSystemObject(example.getSchema())) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (example instanceof Catalog) {
|
||||||
|
//noinspection HardCodedStringLiteral,HardCodedStringLiteral,HardCodedStringLiteral,HardCodedStringLiteral
|
||||||
|
if (("SYSTEM".equals(example.getName()) || "SYS".equals(example.getName()) || "CTXSYS".equals(example.getName()) || "XDB".equals(example.getName()))) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
} else if (example.getName() != null) {
|
||||||
|
//noinspection HardCodedStringLiteral
|
||||||
|
if (example.getName().startsWith("BIN$")) { //oracle deleted table
|
||||||
|
boolean filteredInOriginalQuery = this.canAccessDbaRecycleBin();
|
||||||
|
if (!filteredInOriginalQuery) {
|
||||||
|
filteredInOriginalQuery = StringUtil.trimToEmpty(example.getSchema().getName()).equalsIgnoreCase(this.getConnection().getConnectionUserName());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (filteredInOriginalQuery) {
|
||||||
|
return !((example instanceof PrimaryKey) || (example instanceof Index) || (example instanceof
|
||||||
|
liquibase.statement.UniqueConstraint));
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
} else //noinspection HardCodedStringLiteral
|
||||||
|
if (example.getName().startsWith("AQ$")) { //oracle AQ tables
|
||||||
|
return true;
|
||||||
|
} else //noinspection HardCodedStringLiteral
|
||||||
|
if (example.getName().startsWith("DR$")) { //oracle index tables
|
||||||
|
return true;
|
||||||
|
} else //noinspection HardCodedStringLiteral
|
||||||
|
if (example.getName().startsWith("SYS_IOT_OVER")) { //oracle system table
|
||||||
|
return true;
|
||||||
|
} else //noinspection HardCodedStringLiteral,HardCodedStringLiteral
|
||||||
|
if ((example.getName().startsWith("MDRT_") || example.getName().startsWith("MDRS_")) && example.getName().endsWith("$")) {
|
||||||
|
// CORE-1768 - Oracle creates these for spatial indices and will remove them when the index is removed.
|
||||||
|
return true;
|
||||||
|
} else //noinspection HardCodedStringLiteral
|
||||||
|
if (example.getName().startsWith("MLOG$_")) { //Created by materliaized view logs for every table that is part of a materialized view. Not available for DDL operations.
|
||||||
|
return true;
|
||||||
|
} else //noinspection HardCodedStringLiteral
|
||||||
|
if (example.getName().startsWith("RUPD$_")) { //Created by materialized view log tables using primary keys. Not available for DDL operations.
|
||||||
|
return true;
|
||||||
|
} else //noinspection HardCodedStringLiteral
|
||||||
|
if (example.getName().startsWith("WM$_")) { //Workspace Manager backup tables.
|
||||||
|
return true;
|
||||||
|
} else //noinspection HardCodedStringLiteral
|
||||||
|
if ("CREATE$JAVA$LOB$TABLE".equals(example.getName())) { //This table contains the name of the Java object, the date it was loaded, and has a BLOB column to store the Java object.
|
||||||
|
return true;
|
||||||
|
} else //noinspection HardCodedStringLiteral
|
||||||
|
if ("JAVA$CLASS$MD5$TABLE".equals(example.getName())) { //This is a hash table that tracks the loading of Java objects into a schema.
|
||||||
|
return true;
|
||||||
|
} else //noinspection HardCodedStringLiteral
|
||||||
|
if (example.getName().startsWith("ISEQ$$_")) { //System-generated sequence
|
||||||
|
return true;
|
||||||
|
} else //noinspection HardCodedStringLiteral
|
||||||
|
if (example.getName().startsWith("USLOG$")) { //for update materialized view
|
||||||
|
return true;
|
||||||
|
} else if (example.getName().startsWith("SYS_FBA")) { //for Flashback tables
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return super.isSystemObject(example);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean supportsAutoIncrement() {
|
||||||
|
// Oracle supports Identity beginning with version 12c
|
||||||
|
boolean isAutoIncrementSupported = false;
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (getDatabaseMajorVersion() >= 12) {
|
||||||
|
isAutoIncrementSupported = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returning true will generate create table command with 'IDENTITY' clause, example:
|
||||||
|
// CREATE TABLE AutoIncTest (IDPrimaryKey NUMBER(19) GENERATED BY DEFAULT AS IDENTITY NOT NULL, TypeID NUMBER(3) NOT NULL, Description NVARCHAR2(50), CONSTRAINT PK_AutoIncTest PRIMARY KEY (IDPrimaryKey));
|
||||||
|
|
||||||
|
// While returning false will continue to generate create table command without 'IDENTITY' clause, example:
|
||||||
|
// CREATE TABLE AutoIncTest (IDPrimaryKey NUMBER(19) NOT NULL, TypeID NUMBER(3) NOT NULL, Description NVARCHAR2(50), CONSTRAINT PK_AutoIncTest PRIMARY KEY (IDPrimaryKey));
|
||||||
|
|
||||||
|
} catch (DatabaseException ex) {
|
||||||
|
isAutoIncrementSupported = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return isAutoIncrementSupported;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// public Set<UniqueConstraint> findUniqueConstraints(String schema) throws DatabaseException {
|
||||||
|
// Set<UniqueConstraint> returnSet = new HashSet<UniqueConstraint>();
|
||||||
|
//
|
||||||
|
// List<Map> maps = new Executor(this).queryForList(new RawSqlStatement("SELECT UC.CONSTRAINT_NAME, UCC.TABLE_NAME, UCC.COLUMN_NAME FROM USER_CONSTRAINTS UC, USER_CONS_COLUMNS UCC WHERE UC.CONSTRAINT_NAME=UCC.CONSTRAINT_NAME AND CONSTRAINT_TYPE='U' ORDER BY UC.CONSTRAINT_NAME"));
|
||||||
|
//
|
||||||
|
// UniqueConstraint constraint = null;
|
||||||
|
// for (Map map : maps) {
|
||||||
|
// if (constraint == null || !constraint.getName().equals(constraint.getName())) {
|
||||||
|
// returnSet.add(constraint);
|
||||||
|
// Table table = new Table((String) map.get("TABLE_NAME"));
|
||||||
|
// constraint = new UniqueConstraint(map.get("CONSTRAINT_NAME").toString(), table);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// if (constraint != null) {
|
||||||
|
// returnSet.add(constraint);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// return returnSet;
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean supportsRestrictForeignKeys() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getDataTypeMaxParameters(String dataTypeName) {
|
||||||
|
//noinspection HardCodedStringLiteral
|
||||||
|
if ("BINARY_FLOAT".equals(dataTypeName.toUpperCase())) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
//noinspection HardCodedStringLiteral
|
||||||
|
if ("BINARY_DOUBLE".equals(dataTypeName.toUpperCase())) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return super.getDataTypeMaxParameters(dataTypeName);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSystemTableWhereClause(String tableNameColumn) {
|
||||||
|
List<String> clauses = new ArrayList<String>(Arrays.asList("BIN$",
|
||||||
|
"AQ$",
|
||||||
|
"DR$",
|
||||||
|
"SYS_IOT_OVER",
|
||||||
|
"MLOG$_",
|
||||||
|
"RUPD$_",
|
||||||
|
"WM$_",
|
||||||
|
"ISEQ$$_",
|
||||||
|
"USLOG$",
|
||||||
|
"SYS_FBA"));
|
||||||
|
|
||||||
|
for (int i = 0;i<clauses.size(); i++) {
|
||||||
|
clauses.set(i, tableNameColumn+" NOT LIKE '"+clauses.get(i)+"%'");
|
||||||
|
}
|
||||||
|
return "("+ StringUtil.join(clauses, " AND ") + ")";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean jdbcCallsCatalogsSchemas() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Set<String> getUserDefinedTypes() {
|
||||||
|
if (userDefinedTypes == null) {
|
||||||
|
userDefinedTypes = new HashSet<>();
|
||||||
|
if ((getConnection() != null) && !(getConnection() instanceof OfflineConnection)) {
|
||||||
|
try {
|
||||||
|
try {
|
||||||
|
//noinspection HardCodedStringLiteral
|
||||||
|
userDefinedTypes.addAll(Scope.getCurrentScope().getSingleton(ExecutorService.class).getExecutor("jdbc", this).queryForList(new RawSqlStatement("SELECT DISTINCT TYPE_NAME FROM ALL_TYPES"), String.class));
|
||||||
|
} catch (DatabaseException e) { //fall back to USER_TYPES if the user cannot see ALL_TYPES
|
||||||
|
//noinspection HardCodedStringLiteral
|
||||||
|
userDefinedTypes.addAll(Scope.getCurrentScope().getSingleton(ExecutorService.class).getExecutor("jdbc", this).queryForList(new RawSqlStatement("SELECT TYPE_NAME FROM USER_TYPES"), String.class));
|
||||||
|
}
|
||||||
|
} catch (DatabaseException e) {
|
||||||
|
//ignore error
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return userDefinedTypes;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String generateDatabaseFunctionValue(DatabaseFunction databaseFunction) {
|
||||||
|
//noinspection HardCodedStringLiteral
|
||||||
|
if ((databaseFunction != null) && "current_timestamp".equalsIgnoreCase(databaseFunction.toString())) {
|
||||||
|
return databaseFunction.toString();
|
||||||
|
}
|
||||||
|
if ((databaseFunction instanceof SequenceNextValueFunction) || (databaseFunction instanceof
|
||||||
|
SequenceCurrentValueFunction)) {
|
||||||
|
String quotedSeq = super.generateDatabaseFunctionValue(databaseFunction);
|
||||||
|
// replace "myschema.my_seq".nextval with "myschema"."my_seq".nextval
|
||||||
|
return quotedSeq.replaceFirst("\"([^\\.\"]+)\\.([^\\.\"]+)\"", "\"$1\".\"$2\"");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return super.generateDatabaseFunctionValue(databaseFunction);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ValidationErrors validate() {
|
||||||
|
ValidationErrors errors = super.validate();
|
||||||
|
DatabaseConnection connection = getConnection();
|
||||||
|
if ((connection == null) || (connection instanceof OfflineConnection)) {
|
||||||
|
//noinspection HardCodedStringLiteral
|
||||||
|
Scope.getCurrentScope().getLog(getClass()).info("Cannot validate offline database");
|
||||||
|
return errors;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!canAccessDbaRecycleBin()) {
|
||||||
|
errors.addWarning(getDbaRecycleBinWarning());
|
||||||
|
}
|
||||||
|
|
||||||
|
return errors;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDbaRecycleBinWarning() {
|
||||||
|
//noinspection HardCodedStringLiteral,HardCodedStringLiteral,HardCodedStringLiteral,HardCodedStringLiteral,
|
||||||
|
// HardCodedStringLiteral
|
||||||
|
//noinspection HardCodedStringLiteral,HardCodedStringLiteral,HardCodedStringLiteral
|
||||||
|
return "Liquibase needs to access the DBA_RECYCLEBIN table so we can automatically handle the case where " +
|
||||||
|
"constraints are deleted and restored. Since Oracle doesn't properly restore the original table names " +
|
||||||
|
"referenced in the constraint, we use the information from the DBA_RECYCLEBIN to automatically correct this" +
|
||||||
|
" issue.\n" +
|
||||||
|
"\n" +
|
||||||
|
"The user you used to connect to the database (" + getConnection().getConnectionUserName() +
|
||||||
|
") needs to have \"SELECT ON SYS.DBA_RECYCLEBIN\" permissions set before we can perform this operation. " +
|
||||||
|
"Please run the following SQL to set the appropriate permissions, and try running the command again.\n" +
|
||||||
|
"\n" +
|
||||||
|
" GRANT SELECT ON SYS.DBA_RECYCLEBIN TO " + getConnection().getConnectionUserName() + ";";
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean canAccessDbaRecycleBin() {
|
||||||
|
if (canAccessDbaRecycleBin == null) {
|
||||||
|
DatabaseConnection connection = getConnection();
|
||||||
|
if ((connection == null) || (connection instanceof OfflineConnection)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
Statement statement = null;
|
||||||
|
try {
|
||||||
|
statement = ((JdbcConnection) connection).createStatement();
|
||||||
|
@SuppressWarnings("HardCodedStringLiteral") ResultSet resultSet = statement.executeQuery("select 1 from dba_recyclebin where 0=1");
|
||||||
|
resultSet.close(); //don't need to do anything with the result set, just make sure statement ran.
|
||||||
|
this.canAccessDbaRecycleBin = true;
|
||||||
|
} catch (Exception e) {
|
||||||
|
//noinspection HardCodedStringLiteral
|
||||||
|
if ((e instanceof SQLException) && e.getMessage().startsWith("ORA-00942")) { //ORA-00942: table or view does not exist
|
||||||
|
this.canAccessDbaRecycleBin = false;
|
||||||
|
} else {
|
||||||
|
//noinspection HardCodedStringLiteral
|
||||||
|
Scope.getCurrentScope().getLog(getClass()).warning("Cannot check dba_recyclebin access", e);
|
||||||
|
this.canAccessDbaRecycleBin = false;
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
JdbcUtils.close(null, statement);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return canAccessDbaRecycleBin;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean supportsNotNullConstraintNames() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests if the given String would be a valid identifier in Oracle DBMS. In Oracle, a valid identifier has
|
||||||
|
* the following form (case-insensitive comparison):
|
||||||
|
* 1st character: A-Z
|
||||||
|
* 2..n characters: A-Z0-9$_#
|
||||||
|
* The maximum length of an identifier differs by Oracle version and object type.
|
||||||
|
*/
|
||||||
|
public boolean isValidOracleIdentifier(String identifier, Class<? extends DatabaseObject> type) {
|
||||||
|
if ((identifier == null) || (identifier.length() < 1))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (!identifier.matches("^(i?)[A-Z][A-Z0-9\\$\\_\\#]*$"))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @todo It seems we currently do not have a class for tablespace identifiers, and all other classes
|
||||||
|
* we do know seem to be supported as 12cR2 long identifiers, so:
|
||||||
|
*/
|
||||||
|
return (identifier.length() <= LONG_IDENTIFIERS_LEGNTH);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the maximum number of bytes (NOT: characters) for an identifier. For Oracle <=12c Release 20, this
|
||||||
|
* is 30 bytes, and starting from 12cR2, up to 128 (except for tablespaces, PDB names and some other rather rare
|
||||||
|
* object types).
|
||||||
|
*
|
||||||
|
* @return the maximum length of an object identifier, in bytes
|
||||||
|
*/
|
||||||
|
public int getIdentifierMaximumLength() {
|
||||||
|
try {
|
||||||
|
if (getDatabaseMajorVersion() < ORACLE_12C_MAJOR_VERSION) {
|
||||||
|
return SHORT_IDENTIFIERS_LENGTH;
|
||||||
|
} else if ((getDatabaseMajorVersion() == ORACLE_12C_MAJOR_VERSION) && (getDatabaseMinorVersion() <= 1)) {
|
||||||
|
return SHORT_IDENTIFIERS_LENGTH;
|
||||||
|
} else {
|
||||||
|
return LONG_IDENTIFIERS_LEGNTH;
|
||||||
|
}
|
||||||
|
} catch (DatabaseException ex) {
|
||||||
|
throw new UnexpectedLiquibaseException("Cannot determine the Oracle database version number", ex);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||