commit
e2b4780f0c
8 changed files with 2401 additions and 0 deletions
-
249.flattened-pom.xml
-
202LICENSE
-
149README.md
-
11db/Dockerfile
-
1096db/pig.sql
-
307db/pig_config.sql
-
105docker-compose.yml
-
282pom.xml
@ -0,0 +1,249 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!-- |
|||
~ Copyright (c) 2020 pig4cloud Authors. All Rights Reserved. |
|||
~ |
|||
~ Licensed under the Apache License, Version 2.0 (the "License"); |
|||
~ you may not use this file except in compliance with the License. |
|||
~ You may obtain a copy of the License at |
|||
~ |
|||
~ http://www.apache.org/licenses/LICENSE-2.0 |
|||
~ |
|||
~ Unless required by applicable law or agreed to in writing, software |
|||
~ distributed under the License is distributed on an "AS IS" BASIS, |
|||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|||
~ See the License for the specific language governing permissions and |
|||
~ limitations under the License. |
|||
--> |
|||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" |
|||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
|||
<modelVersion>4.0.0</modelVersion> |
|||
<groupId>com.pig4cloud</groupId> |
|||
<artifactId>iec</artifactId> |
|||
<version>3.8.1-JDK8</version> |
|||
<packaging>pom</packaging> |
|||
<name>${project.artifactId}</name> |
|||
<url>https://www.pig4cloud.com</url> |
|||
<modules> |
|||
<module>iec-register</module> |
|||
<module>iec-gateway</module> |
|||
<module>iec-auth</module> |
|||
<module>iec-upms</module> |
|||
<module>iec-common</module> |
|||
</modules> |
|||
<properties> |
|||
<xxl-job.version>2.4.0</xxl-job.version> |
|||
<velocity.version>2.3</velocity.version> |
|||
<knife4j.version>3.0.5</knife4j.version> |
|||
<screw.version>0.0.1</screw.version> |
|||
<lombok.version>1.18.30</lombok.version> |
|||
<flatten-maven-plugin.version>1.6.0</flatten-maven-plugin.version> |
|||
<spring-boot.version>2.7.18</spring-boot.version> |
|||
<docker.namespace>pig4cloud</docker.namespace> |
|||
<spring-cloud.version>2021.0.8</spring-cloud.version> |
|||
<captcha.version>2.2.3</captcha.version> |
|||
<configuration.version>1.10</configuration.version> |
|||
<docker.password>password</docker.password> |
|||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
|||
<spring.authorization.version>0.4.5</spring.authorization.version> |
|||
<revision>3.8.1-JDK8</revision> |
|||
<maven.compiler.source>1.8</maven.compiler.source> |
|||
<velocity.tool.version>3.1</velocity.tool.version> |
|||
<spring-boot-admin.version>2.7.15</spring-boot-admin.version> |
|||
<jasypt.version>3.0.5</jasypt.version> |
|||
<docker.registry>192.168.0.100</docker.registry> |
|||
<docker.host>http://192.168.0.100:2375</docker.host> |
|||
<maven.compiler.target>1.8</maven.compiler.target> |
|||
<git.commit.plugin>4.9.9</git.commit.plugin> |
|||
<spring.checkstyle.plugin>0.0.39</spring.checkstyle.plugin> |
|||
<springdoc.version>1.6.9</springdoc.version> |
|||
<docker.username>username</docker.username> |
|||
<spring-cloud-alibaba.version>2021.0.6.1</spring-cloud-alibaba.version> |
|||
<docker.plugin.version>0.32.0</docker.plugin.version> |
|||
</properties> |
|||
<dependencyManagement> |
|||
<dependencies> |
|||
<dependency> |
|||
<groupId>com.pig4cloud</groupId> |
|||
<artifactId>iec-common-bom</artifactId> |
|||
<version>${project.version}</version> |
|||
<type>pom</type> |
|||
<scope>import</scope> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-dependencies</artifactId> |
|||
<version>${spring-boot.version}</version> |
|||
<type>pom</type> |
|||
<scope>import</scope> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.springframework.cloud</groupId> |
|||
<artifactId>spring-cloud-dependencies</artifactId> |
|||
<version>${spring-cloud.version}</version> |
|||
<type>pom</type> |
|||
<scope>import</scope> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.alibaba.cloud</groupId> |
|||
<artifactId>spring-cloud-alibaba-dependencies</artifactId> |
|||
<version>${spring-cloud-alibaba.version}</version> |
|||
<type>pom</type> |
|||
<scope>import</scope> |
|||
</dependency> |
|||
</dependencies> |
|||
</dependencyManagement> |
|||
<dependencies> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-configuration-processor</artifactId> |
|||
<optional>true</optional> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.github.ulisesbocchio</groupId> |
|||
<artifactId>jasypt-spring-boot-starter</artifactId> |
|||
<version>${jasypt.version}</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-actuator</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>de.codecentric</groupId> |
|||
<artifactId>spring-boot-admin-starter-client</artifactId> |
|||
<version>${spring-boot-admin.version}</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.projectlombok</groupId> |
|||
<artifactId>lombok</artifactId> |
|||
<version>${lombok.version}</version> |
|||
<scope>provided</scope> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-test</artifactId> |
|||
<scope>test</scope> |
|||
</dependency> |
|||
</dependencies> |
|||
<build> |
|||
<resources> |
|||
<resource> |
|||
<filtering>true</filtering> |
|||
<directory>src/main/resources</directory> |
|||
</resource> |
|||
</resources> |
|||
<finalName>${project.name}</finalName> |
|||
<pluginManagement> |
|||
<plugins> |
|||
<plugin> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-maven-plugin</artifactId> |
|||
<version>${spring-boot.version}</version> |
|||
<executions> |
|||
<execution> |
|||
<goals> |
|||
<goal>repackage</goal> |
|||
</goals> |
|||
</execution> |
|||
</executions> |
|||
<configuration> |
|||
<finalName>${project.build.finalName}</finalName> |
|||
<layers> |
|||
<enabled>true</enabled> |
|||
</layers> |
|||
</configuration> |
|||
</plugin> |
|||
<plugin> |
|||
<groupId>io.fabric8</groupId> |
|||
<artifactId>docker-maven-plugin</artifactId> |
|||
<version>${docker.plugin.version}</version> |
|||
<configuration> |
|||
<dockerHost>${docker.host}</dockerHost> |
|||
<registry>${docker.registry}</registry> |
|||
<authConfig> |
|||
<push> |
|||
<username>${docker.username}</username> |
|||
<password>${docker.password}</password> |
|||
</push> |
|||
</authConfig> |
|||
<images> |
|||
<image> |
|||
<name>${docker.registry}/${docker.namespace}/${project.name}:${project.version}</name> |
|||
<build> |
|||
<dockerFile>${project.basedir}/Dockerfile</dockerFile> |
|||
</build> |
|||
</image> |
|||
</images> |
|||
</configuration> |
|||
</plugin> |
|||
</plugins> |
|||
</pluginManagement> |
|||
<plugins> |
|||
<plugin> |
|||
<groupId>org.codehaus.mojo</groupId> |
|||
<artifactId>flatten-maven-plugin</artifactId> |
|||
<version>${flatten-maven-plugin.version}</version> |
|||
<executions> |
|||
<execution> |
|||
<id>flatten</id> |
|||
<phase>process-resources</phase> |
|||
<goals> |
|||
<goal>flatten</goal> |
|||
</goals> |
|||
</execution> |
|||
<execution> |
|||
<id>flatten.clean</id> |
|||
<phase>clean</phase> |
|||
<goals> |
|||
<goal>clean</goal> |
|||
</goals> |
|||
</execution> |
|||
</executions> |
|||
<configuration> |
|||
<flattenMode>resolveCiFriendliesOnly</flattenMode> |
|||
<updatePomFile>true</updatePomFile> |
|||
</configuration> |
|||
</plugin> |
|||
<plugin> |
|||
<groupId>io.github.git-commit-id</groupId> |
|||
<artifactId>git-commit-id-maven-plugin</artifactId> |
|||
<version>${git.commit.plugin}</version> |
|||
<executions> |
|||
<execution> |
|||
<id>get-the-git-infos</id> |
|||
<phase>initialize</phase> |
|||
<goals> |
|||
<goal>revision</goal> |
|||
</goals> |
|||
</execution> |
|||
</executions> |
|||
<configuration> |
|||
<failOnNoGitDirectory>false</failOnNoGitDirectory> |
|||
<generateGitPropertiesFile>true</generateGitPropertiesFile> |
|||
<dateFormat>yyyy-MM-dd HH:mm:ss</dateFormat> |
|||
<includeOnlyProperties> |
|||
<includeOnlyProperty>^git.build.(time|version)$</includeOnlyProperty> |
|||
<includeOnlyProperty>^git.commit.(id|message|time).*$</includeOnlyProperty> |
|||
</includeOnlyProperties> |
|||
</configuration> |
|||
</plugin> |
|||
<plugin> |
|||
<groupId>io.spring.javaformat</groupId> |
|||
<artifactId>spring-javaformat-maven-plugin</artifactId> |
|||
<version>${spring.checkstyle.plugin}</version> |
|||
</plugin> |
|||
</plugins> |
|||
</build> |
|||
<profiles> |
|||
<profile> |
|||
<id>cloud</id> |
|||
<activation> |
|||
<activeByDefault>true</activeByDefault> |
|||
</activation> |
|||
<properties> |
|||
<nacos.password>nacos</nacos.password> |
|||
<profiles.active>dev</profiles.active> |
|||
<nacos.username>nacos</nacos.username> |
|||
</properties> |
|||
</profile> |
|||
</profiles> |
|||
</project> |
|||
@ -0,0 +1,202 @@ |
|||
|
|||
Apache License |
|||
Version 2.0, January 2004 |
|||
http://www.apache.org/licenses/ |
|||
|
|||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION |
|||
|
|||
1. Definitions. |
|||
|
|||
"License" shall mean the terms and conditions for use, reproduction, |
|||
and distribution as defined by Sections 1 through 9 of this document. |
|||
|
|||
"Licensor" shall mean the copyright owner or entity authorized by |
|||
the copyright owner that is granting the License. |
|||
|
|||
"Legal Entity" shall mean the union of the acting entity and all |
|||
other entities that control, are controlled by, or are under common |
|||
control with that entity. For the purposes of this definition, |
|||
"control" means (i) the power, direct or indirect, to cause the |
|||
direction or management of such entity, whether by contract or |
|||
otherwise, or (ii) ownership of fifty percent (50%) or more of the |
|||
outstanding shares, or (iii) beneficial ownership of such entity. |
|||
|
|||
"You" (or "Your") shall mean an individual or Legal Entity |
|||
exercising permissions granted by this License. |
|||
|
|||
"Source" form shall mean the preferred form for making modifications, |
|||
including but not limited to software source code, documentation |
|||
source, and configuration files. |
|||
|
|||
"Object" form shall mean any form resulting from mechanical |
|||
transformation or translation of a Source form, including but |
|||
not limited to compiled object code, generated documentation, |
|||
and conversions to other media types. |
|||
|
|||
"Work" shall mean the work of authorship, whether in Source or |
|||
Object form, made available under the License, as indicated by a |
|||
copyright notice that is included in or attached to the work |
|||
(an example is provided in the Appendix below). |
|||
|
|||
"Derivative Works" shall mean any work, whether in Source or Object |
|||
form, that is based on (or derived from) the Work and for which the |
|||
editorial revisions, annotations, elaborations, or other modifications |
|||
represent, as a whole, an original work of authorship. For the purposes |
|||
of this License, Derivative Works shall not include works that remain |
|||
separable from, or merely link (or bind by name) to the interfaces of, |
|||
the Work and Derivative Works thereof. |
|||
|
|||
"Contribution" shall mean any work of authorship, including |
|||
the original version of the Work and any modifications or additions |
|||
to that Work or Derivative Works thereof, that is intentionally |
|||
submitted to Licensor for inclusion in the Work by the copyright owner |
|||
or by an individual or Legal Entity authorized to submit on behalf of |
|||
the copyright owner. For the purposes of this definition, "submitted" |
|||
means any form of electronic, verbal, or written communication sent |
|||
to the Licensor or its representatives, including but not limited to |
|||
communication on electronic mailing lists, source code control systems, |
|||
and issue tracking systems that are managed by, or on behalf of, the |
|||
Licensor for the purpose of discussing and improving the Work, but |
|||
excluding communication that is conspicuously marked or otherwise |
|||
designated in writing by the copyright owner as "Not a Contribution." |
|||
|
|||
"Contributor" shall mean Licensor and any individual or Legal Entity |
|||
on behalf of whom a Contribution has been received by Licensor and |
|||
subsequently incorporated within the Work. |
|||
|
|||
2. Grant of Copyright License. Subject to the terms and conditions of |
|||
this License, each Contributor hereby grants to You a perpetual, |
|||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
|||
copyright license to reproduce, prepare Derivative Works of, |
|||
publicly display, publicly perform, sublicense, and distribute the |
|||
Work and such Derivative Works in Source or Object form. |
|||
|
|||
3. Grant of Patent License. Subject to the terms and conditions of |
|||
this License, each Contributor hereby grants to You a perpetual, |
|||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
|||
(except as stated in this section) patent license to make, have made, |
|||
use, offer to sell, sell, import, and otherwise transfer the Work, |
|||
where such license applies only to those patent claims licensable |
|||
by such Contributor that are necessarily infringed by their |
|||
Contribution(s) alone or by combination of their Contribution(s) |
|||
with the Work to which such Contribution(s) was submitted. If You |
|||
institute patent litigation against any entity (including a |
|||
cross-claim or counterclaim in a lawsuit) alleging that the Work |
|||
or a Contribution incorporated within the Work constitutes direct |
|||
or contributory patent infringement, then any patent licenses |
|||
granted to You under this License for that Work shall terminate |
|||
as of the date such litigation is filed. |
|||
|
|||
4. Redistribution. You may reproduce and distribute copies of the |
|||
Work or Derivative Works thereof in any medium, with or without |
|||
modifications, and in Source or Object form, provided that You |
|||
meet the following conditions: |
|||
|
|||
(a) You must give any other recipients of the Work or |
|||
Derivative Works a copy of this License; and |
|||
|
|||
(b) You must cause any modified files to carry prominent notices |
|||
stating that You changed the files; and |
|||
|
|||
(c) You must retain, in the Source form of any Derivative Works |
|||
that You distribute, all copyright, patent, trademark, and |
|||
attribution notices from the Source form of the Work, |
|||
excluding those notices that do not pertain to any part of |
|||
the Derivative Works; and |
|||
|
|||
(d) If the Work includes a "NOTICE" text file as part of its |
|||
distribution, then any Derivative Works that You distribute must |
|||
include a readable copy of the attribution notices contained |
|||
within such NOTICE file, excluding those notices that do not |
|||
pertain to any part of the Derivative Works, in at least one |
|||
of the following places: within a NOTICE text file distributed |
|||
as part of the Derivative Works; within the Source form or |
|||
documentation, if provided along with the Derivative Works; or, |
|||
within a display generated by the Derivative Works, if and |
|||
wherever such third-party notices normally appear. The contents |
|||
of the NOTICE file are for informational purposes only and |
|||
do not modify the License. You may add Your own attribution |
|||
notices within Derivative Works that You distribute, alongside |
|||
or as an addendum to the NOTICE text from the Work, provided |
|||
that such additional attribution notices cannot be construed |
|||
as modifying the License. |
|||
|
|||
You may add Your own copyright statement to Your modifications and |
|||
may provide additional or different license terms and conditions |
|||
for use, reproduction, or distribution of Your modifications, or |
|||
for any such Derivative Works as a whole, provided Your use, |
|||
reproduction, and distribution of the Work otherwise complies with |
|||
the conditions stated in this License. |
|||
|
|||
5. Submission of Contributions. Unless You explicitly state otherwise, |
|||
any Contribution intentionally submitted for inclusion in the Work |
|||
by You to the Licensor shall be under the terms and conditions of |
|||
this License, without any additional terms or conditions. |
|||
Notwithstanding the above, nothing herein shall supersede or modify |
|||
the terms of any separate license agreement you may have executed |
|||
with Licensor regarding such Contributions. |
|||
|
|||
6. Trademarks. This License does not grant permission to use the trade |
|||
names, trademarks, service marks, or product names of the Licensor, |
|||
except as required for reasonable and customary use in describing the |
|||
origin of the Work and reproducing the content of the NOTICE file. |
|||
|
|||
7. Disclaimer of Warranty. Unless required by applicable law or |
|||
agreed to in writing, Licensor provides the Work (and each |
|||
Contributor provides its Contributions) on an "AS IS" BASIS, |
|||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
|||
implied, including, without limitation, any warranties or conditions |
|||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A |
|||
PARTICULAR PURPOSE. You are solely responsible for determining the |
|||
appropriateness of using or redistributing the Work and assume any |
|||
risks associated with Your exercise of permissions under this License. |
|||
|
|||
8. Limitation of Liability. In no event and under no legal theory, |
|||
whether in tort (including negligence), contract, or otherwise, |
|||
unless required by applicable law (such as deliberate and grossly |
|||
negligent acts) or agreed to in writing, shall any Contributor be |
|||
liable to You for damages, including any direct, indirect, special, |
|||
incidental, or consequential damages of any character arising as a |
|||
result of this License or out of the use or inability to use the |
|||
Work (including but not limited to damages for loss of goodwill, |
|||
work stoppage, computer failure or malfunction, or any and all |
|||
other commercial damages or losses), even if such Contributor |
|||
has been advised of the possibility of such damages. |
|||
|
|||
9. Accepting Warranty or Additional Liability. While redistributing |
|||
the Work or Derivative Works thereof, You may choose to offer, |
|||
and charge a fee for, acceptance of support, warranty, indemnity, |
|||
or other liability obligations and/or rights consistent with this |
|||
License. However, in accepting such obligations, You may act only |
|||
on Your own behalf and on Your sole responsibility, not on behalf |
|||
of any other Contributor, and only if You agree to indemnify, |
|||
defend, and hold each Contributor harmless for any liability |
|||
incurred by, or claims asserted against, such Contributor by reason |
|||
of your accepting any such warranty or additional liability. |
|||
|
|||
END OF TERMS AND CONDITIONS |
|||
|
|||
APPENDIX: How to apply the Apache License to your work. |
|||
|
|||
To apply the Apache License to your work, attach the following |
|||
boilerplate notice, with the fields enclosed by brackets "[]" |
|||
replaced with your own identifying information. (Don't include |
|||
the brackets!) The text should be enclosed in the appropriate |
|||
comment syntax for the file format. We also recommend that a |
|||
file or class name and description of purpose be included on the |
|||
same "printed page" as the copyright notice for easier |
|||
identification within third-party archives. |
|||
|
|||
Copyright (c) 2020 pig4cloud Authors. All Rights Reserved. |
|||
|
|||
Licensed under the Apache License, Version 2.0 (the "License"); |
|||
you may not use this file except in compliance with the License. |
|||
You may obtain a copy of the License at |
|||
|
|||
http://www.apache.org/licenses/LICENSE-2.0 |
|||
|
|||
Unless required by applicable law or agreed to in writing, software |
|||
distributed under the License is distributed on an "AS IS" BASIS, |
|||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|||
See the License for the specific language governing permissions and |
|||
limitations under the License. |
|||
@ -0,0 +1,149 @@ |
|||
<p align="center"> |
|||
<img src="https://img.shields.io/badge/Pig-3.8-success.svg" alt="Build Status"> |
|||
<img src="https://img.shields.io/badge/Spring%20Cloud-2021-blue.svg" alt="Coverage Status"> |
|||
<img src="https://img.shields.io/badge/Spring%20Boot-2.7-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/pig-mesh/pig"/> |
|||
</p> |
|||
|
|||
## 系统说明 |
|||
|
|||
- 基于 Spring Cloud 2021 、Spring Boot 2.7、 OAuth2 的 RBAC **权限管理系统** |
|||
- 基于数据驱动视图的理念封装 element-plus,即使没有 vue 的使用经验也能快速上手 |
|||
- 提供对常见容器化支持 Docker、Kubernetes、Rancher2 支持 |
|||
- 提供 lambda 、stream api 、webflux 的生产实践 |
|||
|
|||
## 文档视频 |
|||
|
|||
[ 🚀🚀🚀 低代码数据可视化](http://datav.pig4cloud.com) |
|||
|
|||
[ 配套文档 wiki.pig4cloud.com](https://wiki.pig4cloud.com) |
|||
|
|||
[ 配套视频 tv.pig4cloud.com](https://www.bilibili.com/video/BV12t411B7e9) |
|||
|
|||
[PIGX 在线体验 pigx.pigx.top](http://pigx.pigx.top) |
|||
|
|||
[产品白皮书 paper.pig4cloud.com](https://paper.pig4cloud.com) |
|||
|
|||
## 微信群 [禁广告] |
|||
|
|||
 |
|||
|
|||
## 快速开始 |
|||
|
|||
### 分支说明 |
|||
|
|||
- master: java8 + springboot 2.7 + springcloud 2021 |
|||
- jdk17: java17 + springboot 3.1 + springcloud 2022 |
|||
|
|||
### 核心依赖 |
|||
|
|||
| 依赖 | 版本 | |
|||
|-----------------------------|------------| |
|||
| Spring Boot | 2.7.18 | |
|||
| Spring Cloud | 2021.0.8 | |
|||
| Spring Cloud Alibaba | 2021.0.6.1 | |
|||
| Spring Authorization Server | 0.4.4 | |
|||
| Mybatis Plus | 3.5.7 | |
|||
| hutool | 5.8.29 | |
|||
|
|||
### 模块说明 |
|||
|
|||
```lua |
|||
pig-ui -- https://gitee.com/log4j/pig-ui |
|||
|
|||
pig |
|||
├── pig-auth -- 授权服务提供[3000] |
|||
├── pig-boot -- 单体模式启动[9999] |
|||
└── pig-common -- 系统公共模块 |
|||
├── pig-common-bom -- 全局依赖管理控制 |
|||
├── pig-common-core -- 公共工具类核心包 |
|||
├── pig-common-datasource -- 动态数据源包 |
|||
├── pig-common-job -- xxl-job 封装 |
|||
├── pig-common-log -- 日志服务 |
|||
├── pig-common-oss -- 文件上传工具类 |
|||
├── pig-common-mybatis -- mybatis 扩展封装 |
|||
├── pig-common-seata -- 分布式事务 |
|||
├── pig-common-security -- 安全工具类 |
|||
├── pig-common-swagger -- 接口文档 |
|||
├── pig-common-feign -- feign 扩展封装 |
|||
└── pig-common-xss -- xss 安全封装 |
|||
├── pig-register -- Nacos Server[8848] |
|||
├── pig-gateway -- Spring Cloud Gateway网关[9999] |
|||
└── pig-upms -- 通用用户权限管理模块 |
|||
└── pig-upms-api -- 通用用户权限管理系统公共api模块 |
|||
└── pig-upms-biz -- 通用用户权限管理系统业务处理模块[4000] |
|||
└── pig-visual |
|||
└── pig-monitor -- 服务监控 [5001] |
|||
├── pig-codegen -- 图形化代码生成 [5002] |
|||
└── pig-quartz -- 定时任务管理台 [5007] |
|||
``` |
|||
|
|||
### 本地开发 运行 |
|||
|
|||
pig 提供了详细的[部署文档 wiki.pig4cloud.com](https://www.yuque.com/pig4cloud/pig/vsdox9),包括开发环境安装、服务端代码运行、前端代码运行等。 |
|||
|
|||
请务必**完全按照**文档部署运行章节 进行操作,减少踩坑弯路!! |
|||
|
|||
|
|||
### Docker 运行 |
|||
|
|||
``` |
|||
# 下载并运行服务端代码 |
|||
git clone https://gitee.com/log4j/pig.git |
|||
|
|||
cd pig && mvn clean install && docker-compose up -d |
|||
|
|||
# 下载并运行前端UI |
|||
git clone https://gitee.com/log4j/pig-ui.git |
|||
|
|||
cd pig-ui && npm install -g cnpm --registry=https://registry.npm.taobao.org |
|||
|
|||
|
|||
cnpm install && cnpm run build:docker && cd docker && docker-compose up -d |
|||
``` |
|||
|
|||
## 免费公开课 |
|||
|
|||
<table> |
|||
<tr> |
|||
<td><a href="https://www.bilibili.com/video/av45084065" target="_blank"><img src="https://minio.pigx.top/oss/1655474345.jpg"></a></td> |
|||
<td><a href="https://www.bilibili.com/video/av77344954" target="_blank"><img src="https://minio.pigx.top/oss/1656837143.jpg"></a></td> |
|||
</tr> |
|||
<tr> |
|||
<td><a href="https://www.bilibili.com/video/BV1J5411476V" target="_blank"><img src="https://minio.pigx.top/oss/1655474369.jpg"></a></td> |
|||
<td><a href="https://www.bilibili.com/video/BV14p4y197K5" target="_blank"><img src="https://minio.pigx.top/oss/1655474381.jpg"></a></td> |
|||
</tr> |
|||
</table> |
|||
|
|||
## 开源共建 |
|||
|
|||
### 开源协议 |
|||
|
|||
pig 开源软件遵循 [Apache 2.0 协议](https://www.apache.org/licenses/LICENSE-2.0.html)。 |
|||
允许商业使用,但务必保留类作者、Copyright 信息。 |
|||
|
|||
 |
|||
|
|||
### 其他说明 |
|||
|
|||
1. 欢迎提交 [PR](https://dwz.cn/2KURd5Vf),注意对应提交对应 `dev` 分支 |
|||
代码规范 [spring-javaformat](https://github.com/spring-io/spring-javaformat) |
|||
|
|||
<details> |
|||
<summary>代码规范说明</summary> |
|||
|
|||
1. 由于 <a href="https://github.com/spring-io/spring-javaformat" target="_blank">spring-javaformat</a> |
|||
强制所有代码按照指定格式排版,未按此要求提交的代码将不能通过合并(打包) |
|||
2. 如果使用 IntelliJ IDEA |
|||
开发,请安装自动格式化软件 <a href="https://repo1.maven.org/maven2/io/spring/javaformat/spring-javaformat-intellij-idea-plugin/" target="_blank"> |
|||
spring-javaformat-intellij-idea-plugin</a> |
|||
3. 其他开发工具,请参考 <a href="https://github.com/spring-io/spring-javaformat" target="_blank"> |
|||
spring-javaformat</a> |
|||
说明,或`提交代码前`在项目根目录运行下列命令(需要开发者电脑支持`mvn`命令)进行代码格式化 |
|||
``` |
|||
mvn spring-javaformat:apply |
|||
``` |
|||
</details> |
|||
|
|||
2. 欢迎提交 [issue](https://gitee.com/log4j/pig/issues),请写清楚遇到问题的原因、开发环境、复显步骤。 |
|||
@ -0,0 +1,11 @@ |
|||
FROM registry.cn-hangzhou.aliyuncs.com/dockerhub_mirror/mysql-server:8.0.32 |
|||
|
|||
MAINTAINER lengleng(wangiegie@gmail.com) |
|||
|
|||
ENV TZ=Asia/Shanghai |
|||
|
|||
RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone |
|||
|
|||
COPY ./pig.sql /docker-entrypoint-initdb.d |
|||
|
|||
COPY ./pig_config.sql /docker-entrypoint-initdb.d |
|||
1096
db/pig.sql
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,307 @@ |
|||
DROP DATABASE IF EXISTS `pig_config`; |
|||
|
|||
CREATE DATABASE `pig_config` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; |
|||
|
|||
USE pig_config; |
|||
|
|||
SET NAMES utf8; |
|||
SET FOREIGN_KEY_CHECKS = 0; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for config_info |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `config_info`; |
|||
CREATE TABLE `config_info` ( |
|||
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id', |
|||
`data_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'data_id', |
|||
`group_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, |
|||
`content` longtext CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'content', |
|||
`md5` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT 'md5', |
|||
`gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', |
|||
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间', |
|||
`src_user` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'source user', |
|||
`src_ip` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT 'source ip', |
|||
`app_name` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, |
|||
`tenant_id` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT '' COMMENT '租户字段', |
|||
`c_desc` varchar(256) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, |
|||
`c_use` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, |
|||
`effect` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, |
|||
`type` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, |
|||
`c_schema` text CHARACTER SET utf8 COLLATE utf8_bin, |
|||
`encrypted_data_key` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '秘钥', |
|||
PRIMARY KEY (`id`), |
|||
UNIQUE KEY `uk_configinfo_datagrouptenant` (`data_id`,`group_id`,`tenant_id`) |
|||
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info'; |
|||
|
|||
-- ---------------------------- |
|||
-- Records of config_info |
|||
-- ---------------------------- |
|||
BEGIN; |
|||
INSERT INTO `config_info` (`id`, `data_id`, `group_id`, `content`, `md5`, `gmt_create`, `gmt_modified`, `src_user`, `src_ip`, `app_name`, `tenant_id`, `c_desc`, `c_use`, `effect`, `type`, `c_schema`, `encrypted_data_key`) VALUES (1, 'application-dev.yml', 'DEFAULT_GROUP', '# 配置文件加密根密码\njasypt:\n encryptor:\n password: pig\n algorithm: PBEWithMD5AndDES\n iv-generator-classname: org.jasypt.iv.NoIvGenerator\n \n# Spring 相关\nspring:\n cache:\n type: redis\n redis:\n host: pig-redis\n cloud:\n sentinel:\n eager: true\n transport:\n dashboard: pig-sentinel:5003\n\n# 暴露监控端点\nmanagement:\n endpoints:\n web:\n exposure:\n include: \"*\" \n endpoint:\n health:\n show-details: ALWAYS\n\n\n# feign 配置\nfeign:\n sentinel:\n enabled: true\n okhttp:\n enabled: true\n httpclient:\n enabled: false\n client:\n config:\n default:\n connectTimeout: 10000\n readTimeout: 10000\n compression:\n request:\n enabled: true\n response:\n enabled: true\n\n# mybaits-plus配置\nmybatis-plus:\n mapper-locations: classpath:/mapper/*Mapper.xml\n type-handlers-package: com.pig4cloud.pig.common.mybatis.handler\n global-config:\n banner: false\n db-config:\n id-type: auto\n table-underline: true\n logic-delete-value: 1\n logic-not-delete-value: 0\n configuration:\n map-underscore-to-camel-case: true\n shrink-whitespaces-in-sql: true\n', 'f83479ef911a69ef597de3de2cdf573a', '2022-05-08 12:10:37', '2024-04-07 12:19:24', 'nacos', '0:0:0:0:0:0:0:1', '', '', '', '', '', 'yaml', '', ''); |
|||
INSERT INTO `config_info` (`id`, `data_id`, `group_id`, `content`, `md5`, `gmt_create`, `gmt_modified`, `src_user`, `src_ip`, `app_name`, `tenant_id`, `c_desc`, `c_use`, `effect`, `type`, `c_schema`, `encrypted_data_key`) VALUES (2, 'pig-auth-dev.yml', 'DEFAULT_GROUP', '# 数据源\nspring:\n freemarker:\n allow-request-override: false\n allow-session-override: false\n cache: true\n charset: UTF-8\n check-template-location: true\n content-type: text/html\n enabled: true\n expose-request-attributes: false\n expose-session-attributes: false\n expose-spring-macro-helpers: true\n prefer-file-system-access: true\n suffix: .ftl\n template-loader-path: classpath:/templates/\n\n\nsecurity:\n encode-key: \'thanks,pig4cloud\'\n ignore-clients:\n - test\n - client', '7e1b6667226adbd1505ddae118b473bf', '2022-05-08 12:10:37', '2024-04-07 12:20:21', 'nacos', '0:0:0:0:0:0:0:1', '', '', '', '', '', 'yaml', '', ''); |
|||
INSERT INTO `config_info` (`id`, `data_id`, `group_id`, `content`, `md5`, `gmt_create`, `gmt_modified`, `src_user`, `src_ip`, `app_name`, `tenant_id`, `c_desc`, `c_use`, `effect`, `type`, `c_schema`, `encrypted_data_key`) VALUES (3, 'pig-codegen-dev.yml', 'DEFAULT_GROUP', '# 数据源配置\nspring:\n datasource:\n type: com.zaxxer.hikari.HikariDataSource\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: root\n password: root\n url: jdbc:mysql://pig-mysql:3306/pig?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true\n resources:\n static-locations: classpath:/static/,classpath:/views/\n', '98a9b427c9109be68b9192a0aae60ff2', '2022-05-08 12:10:37', '2024-04-07 14:39:08', 'nacos', '127.0.0.1', '', '', '', '', '', 'yaml', '', ''); |
|||
INSERT INTO `config_info` (`id`, `data_id`, `group_id`, `content`, `md5`, `gmt_create`, `gmt_modified`, `src_user`, `src_ip`, `app_name`, `tenant_id`, `c_desc`, `c_use`, `effect`, `type`, `c_schema`, `encrypted_data_key`) VALUES (4, 'pig-gateway-dev.yml', 'DEFAULT_GROUP', 'spring:\n cloud:\n gateway:\n routes:\n # 认证中心\n - id: pig-auth\n uri: lb://pig-auth\n predicates:\n - Path=/auth/**\n #UPMS 模块\n - id: pig-upms-biz\n uri: lb://pig-upms-biz\n predicates:\n - Path=/admin/**\n # 代码生成模块\n - id: pig-codegen\n uri: lb://pig-codegen\n predicates:\n - Path=/gen/**\n # 代码生成模块\n - id: pig-quartz\n uri: lb://pig-quartz\n predicates:\n - Path=/job/**\n # 固定路由转发配置 无修改\n - id: openapi\n uri: lb://pig-gateway\n predicates:\n - Path=/v3/api-docs/**\n filters:\n - RewritePath=/v3/api-docs/(?<path>.*), /$\\{path}/$\\{path}/v3/api-docs', '6ef9265e4a4298c5f4fdb9fbbf846818', '2022-05-08 12:10:37', '2024-04-07 12:22:09', 'nacos', '0:0:0:0:0:0:0:1', '', '', '', '', '', 'yaml', '', ''); |
|||
INSERT INTO `config_info` (`id`, `data_id`, `group_id`, `content`, `md5`, `gmt_create`, `gmt_modified`, `src_user`, `src_ip`, `app_name`, `tenant_id`, `c_desc`, `c_use`, `effect`, `type`, `c_schema`, `encrypted_data_key`) VALUES (5, 'pig-monitor-dev.yml', 'DEFAULT_GROUP', 'spring:\n autoconfigure:\n exclude: com.pig4cloud.pig.common.core.config.JacksonConfiguration\n # 安全配置\n security:\n user:\n name: ENC(8Hk2ILNJM8UTOuW/Xi75qg==) # pig\n password: ENC(o6cuPFfUevmTbkmBnE67Ow====) # pig\n', '650bdfa15f60f3faa84dfe6e6878b8cf', '2022-05-08 12:10:37', '2022-05-08 12:10:37', NULL, '127.0.0.1', '', '', NULL, NULL, NULL, 'yaml', NULL, ''); |
|||
INSERT INTO `config_info` (`id`, `data_id`, `group_id`, `content`, `md5`, `gmt_create`, `gmt_modified`, `src_user`, `src_ip`, `app_name`, `tenant_id`, `c_desc`, `c_use`, `effect`, `type`, `c_schema`, `encrypted_data_key`) VALUES (6, 'pig-upms-biz-dev.yml', 'DEFAULT_GROUP', '# 数据源\nspring:\n datasource:\n type: com.zaxxer.hikari.HikariDataSource\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: root\n password: root\n url: jdbc:mysql://pig-mysql:3306/pig?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true\n\n# 文件上传相关 支持阿里云、华为云、腾讯、minio\nfile:\n bucketName: s3demo \n local:\n enable: true\n base-path: /Users/lengleng/Downloads/img', '48f8db128aeb5debb331bae49ff37908', '2022-05-08 12:10:37', '2023-07-07 14:44:09', 'nacos', '0:0:0:0:0:0:0:1', '', '', '', '', '', 'yaml', '', ''); |
|||
INSERT INTO `config_info` (`id`, `data_id`, `group_id`, `content`, `md5`, `gmt_create`, `gmt_modified`, `src_user`, `src_ip`, `app_name`, `tenant_id`, `c_desc`, `c_use`, `effect`, `type`, `c_schema`, `encrypted_data_key`) VALUES (7, 'pig-quartz-dev.yml', 'DEFAULT_GROUP', 'spring:\n datasource:\n type: com.zaxxer.hikari.HikariDataSource\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: root\n password: root\n url: jdbc:mysql://pig-mysql:3306/pig?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true\n', '8d9725a73216310178d2835de13c4ebf', '2023-07-02 12:24:33', '2024-04-18 22:36:12', 'nacos', '0:0:0:0:0:0:0:1', '', '', '', '', '', 'yaml', '', ''); |
|||
COMMIT; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for config_info_aggr |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `config_info_aggr`; |
|||
CREATE TABLE `config_info_aggr` ( |
|||
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id', |
|||
`data_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'data_id', |
|||
`group_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'group_id', |
|||
`datum_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'datum_id', |
|||
`content` longtext CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '内容', |
|||
`gmt_modified` datetime NOT NULL COMMENT '修改时间', |
|||
`app_name` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, |
|||
`tenant_id` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT '' COMMENT '租户字段', |
|||
PRIMARY KEY (`id`), |
|||
UNIQUE KEY `uk_configinfoaggr_datagrouptenantdatum` (`data_id`,`group_id`,`tenant_id`,`datum_id`) |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='增加租户字段'; |
|||
|
|||
-- ---------------------------- |
|||
-- Records of config_info_aggr |
|||
-- ---------------------------- |
|||
BEGIN; |
|||
COMMIT; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for config_info_beta |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `config_info_beta`; |
|||
CREATE TABLE `config_info_beta` ( |
|||
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id', |
|||
`data_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'data_id', |
|||
`group_id` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'group_id', |
|||
`app_name` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT 'app_name', |
|||
`content` longtext CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'content', |
|||
`beta_ips` varchar(1024) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT 'betaIps', |
|||
`md5` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT 'md5', |
|||
`gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', |
|||
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间', |
|||
`src_user` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'source user', |
|||
`src_ip` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT 'source ip', |
|||
`tenant_id` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT '' COMMENT '租户字段', |
|||
`encrypted_data_key` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '秘钥', |
|||
PRIMARY KEY (`id`), |
|||
UNIQUE KEY `uk_configinfobeta_datagrouptenant` (`data_id`,`group_id`,`tenant_id`) |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info_beta'; |
|||
|
|||
-- ---------------------------- |
|||
-- Records of config_info_beta |
|||
-- ---------------------------- |
|||
BEGIN; |
|||
COMMIT; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for config_info_tag |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `config_info_tag`; |
|||
CREATE TABLE `config_info_tag` ( |
|||
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id', |
|||
`data_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'data_id', |
|||
`group_id` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'group_id', |
|||
`tenant_id` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT '' COMMENT 'tenant_id', |
|||
`tag_id` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'tag_id', |
|||
`app_name` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT 'app_name', |
|||
`content` longtext CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'content', |
|||
`md5` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT 'md5', |
|||
`gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', |
|||
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间', |
|||
`src_user` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'source user', |
|||
`src_ip` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT 'source ip', |
|||
PRIMARY KEY (`id`), |
|||
UNIQUE KEY `uk_configinfotag_datagrouptenanttag` (`data_id`,`group_id`,`tenant_id`,`tag_id`) |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info_tag'; |
|||
|
|||
-- ---------------------------- |
|||
-- Records of config_info_tag |
|||
-- ---------------------------- |
|||
BEGIN; |
|||
COMMIT; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for config_tags_relation |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `config_tags_relation`; |
|||
CREATE TABLE `config_tags_relation` ( |
|||
`id` bigint NOT NULL COMMENT 'id', |
|||
`tag_name` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'tag_name', |
|||
`tag_type` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT 'tag_type', |
|||
`data_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'data_id', |
|||
`group_id` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'group_id', |
|||
`tenant_id` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT '' COMMENT 'tenant_id', |
|||
`nid` bigint NOT NULL AUTO_INCREMENT, |
|||
PRIMARY KEY (`nid`), |
|||
UNIQUE KEY `uk_configtagrelation_configidtag` (`id`,`tag_name`,`tag_type`), |
|||
KEY `idx_tenant_id` (`tenant_id`) |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_tag_relation'; |
|||
|
|||
-- ---------------------------- |
|||
-- Records of config_tags_relation |
|||
-- ---------------------------- |
|||
BEGIN; |
|||
COMMIT; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for group_capacity |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `group_capacity`; |
|||
CREATE TABLE `group_capacity` ( |
|||
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID', |
|||
`group_id` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT 'Group ID,空字符表示整个集群', |
|||
`quota` int unsigned NOT NULL DEFAULT '0' COMMENT '配额,0表示使用默认值', |
|||
`usage` int unsigned NOT NULL DEFAULT '0' COMMENT '使用量', |
|||
`max_size` int unsigned NOT NULL DEFAULT '0' COMMENT '单个配置大小上限,单位为字节,0表示使用默认值', |
|||
`max_aggr_count` int unsigned NOT NULL DEFAULT '0' COMMENT '聚合子配置最大个数,,0表示使用默认值', |
|||
`max_aggr_size` int unsigned NOT NULL DEFAULT '0' COMMENT '单个聚合数据的子配置大小上限,单位为字节,0表示使用默认值', |
|||
`max_history_count` int unsigned NOT NULL DEFAULT '0' COMMENT '最大变更历史数量', |
|||
`gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', |
|||
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间', |
|||
PRIMARY KEY (`id`), |
|||
UNIQUE KEY `uk_group_id` (`group_id`) |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='集群、各Group容量信息表'; |
|||
|
|||
-- ---------------------------- |
|||
-- Records of group_capacity |
|||
-- ---------------------------- |
|||
BEGIN; |
|||
COMMIT; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for his_config_info |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `his_config_info`; |
|||
CREATE TABLE `his_config_info` ( |
|||
`id` bigint unsigned NOT NULL, |
|||
`nid` bigint unsigned NOT NULL AUTO_INCREMENT, |
|||
`data_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, |
|||
`group_id` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, |
|||
`app_name` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT 'app_name', |
|||
`content` longtext CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, |
|||
`md5` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, |
|||
`gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, |
|||
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, |
|||
`src_user` text CHARACTER SET utf8 COLLATE utf8_bin, |
|||
`src_ip` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, |
|||
`op_type` char(10) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, |
|||
`tenant_id` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT '' COMMENT '租户字段', |
|||
`encrypted_data_key` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '秘钥', |
|||
PRIMARY KEY (`nid`), |
|||
KEY `idx_gmt_create` (`gmt_create`), |
|||
KEY `idx_gmt_modified` (`gmt_modified`), |
|||
KEY `idx_did` (`data_id`) |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='多租户改造'; |
|||
|
|||
-- ---------------------------- |
|||
-- Records of his_config_info |
|||
-- ---------------------------- |
|||
BEGIN; |
|||
COMMIT; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for permissions |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `permissions`; |
|||
CREATE TABLE `permissions` ( |
|||
`role` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, |
|||
`resource` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, |
|||
`action` varchar(8) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, |
|||
UNIQUE KEY `uk_role_permission` (`role`,`resource`,`action`) USING BTREE |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; |
|||
|
|||
-- ---------------------------- |
|||
-- Records of permissions |
|||
-- ---------------------------- |
|||
BEGIN; |
|||
COMMIT; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for roles |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `roles`; |
|||
CREATE TABLE `roles` ( |
|||
`username` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, |
|||
`role` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, |
|||
UNIQUE KEY `idx_user_role` (`username`,`role`) USING BTREE |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; |
|||
|
|||
-- ---------------------------- |
|||
-- Records of roles |
|||
-- ---------------------------- |
|||
BEGIN; |
|||
INSERT INTO `roles` VALUES ('nacos', 'ROLE_ADMIN'); |
|||
COMMIT; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for tenant_capacity |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `tenant_capacity`; |
|||
CREATE TABLE `tenant_capacity` ( |
|||
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID', |
|||
`tenant_id` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT 'Tenant ID', |
|||
`quota` int unsigned NOT NULL DEFAULT '0' COMMENT '配额,0表示使用默认值', |
|||
`usage` int unsigned NOT NULL DEFAULT '0' COMMENT '使用量', |
|||
`max_size` int unsigned NOT NULL DEFAULT '0' COMMENT '单个配置大小上限,单位为字节,0表示使用默认值', |
|||
`max_aggr_count` int unsigned NOT NULL DEFAULT '0' COMMENT '聚合子配置最大个数', |
|||
`max_aggr_size` int unsigned NOT NULL DEFAULT '0' COMMENT '单个聚合数据的子配置大小上限,单位为字节,0表示使用默认值', |
|||
`max_history_count` int unsigned NOT NULL DEFAULT '0' COMMENT '最大变更历史数量', |
|||
`gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', |
|||
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间', |
|||
PRIMARY KEY (`id`), |
|||
UNIQUE KEY `uk_tenant_id` (`tenant_id`) |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='租户容量信息表'; |
|||
|
|||
-- ---------------------------- |
|||
-- Records of tenant_capacity |
|||
-- ---------------------------- |
|||
BEGIN; |
|||
COMMIT; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for tenant_info |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `tenant_info`; |
|||
CREATE TABLE `tenant_info` ( |
|||
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id', |
|||
`kp` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'kp', |
|||
`tenant_id` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT '' COMMENT 'tenant_id', |
|||
`tenant_name` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT '' COMMENT 'tenant_name', |
|||
`tenant_desc` varchar(256) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT 'tenant_desc', |
|||
`create_source` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT 'create_source', |
|||
`gmt_create` bigint NOT NULL COMMENT '创建时间', |
|||
`gmt_modified` bigint NOT NULL COMMENT '修改时间', |
|||
PRIMARY KEY (`id`), |
|||
UNIQUE KEY `uk_tenant_info_kptenantid` (`kp`,`tenant_id`), |
|||
KEY `idx_tenant_id` (`tenant_id`) |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='tenant_info'; |
|||
|
|||
-- ---------------------------- |
|||
-- Records of tenant_info |
|||
-- ---------------------------- |
|||
BEGIN; |
|||
COMMIT; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for users |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `users`; |
|||
CREATE TABLE `users` ( |
|||
`username` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, |
|||
`password` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, |
|||
`enabled` tinyint(1) NOT NULL, |
|||
PRIMARY KEY (`username`) |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; |
|||
|
|||
-- ---------------------------- |
|||
-- Records of users |
|||
-- ---------------------------- |
|||
BEGIN; |
|||
INSERT INTO `users` VALUES ('nacos', '$2a$10$EuWPZHzz32dJN7jexM34MOeYirDdFAZm2kuWj7VEOJhhZkDrxfvUu', 1); |
|||
COMMIT; |
|||
|
|||
SET FOREIGN_KEY_CHECKS = 1; |
|||
@ -0,0 +1,105 @@ |
|||
version: '3' |
|||
services: |
|||
pig-mysql: |
|||
build: |
|||
context: ./db |
|||
environment: |
|||
MYSQL_ROOT_HOST: "%" |
|||
MYSQL_ROOT_PASSWORD: root |
|||
restart: always |
|||
container_name: pig-mysql |
|||
image: pig-mysql |
|||
ports: |
|||
- 3306:3306 |
|||
networks: |
|||
- spring_cloud_default |
|||
|
|||
pig-redis: |
|||
image: registry.cn-hangzhou.aliyuncs.com/dockerhub_mirror/redis |
|||
ports: |
|||
- 6379:6379 |
|||
restart: always |
|||
container_name: pig-redis |
|||
hostname: pig-redis |
|||
networks: |
|||
- spring_cloud_default |
|||
|
|||
pig-register: |
|||
build: |
|||
context: ./pig-register |
|||
restart: always |
|||
ports: |
|||
- 8848:8848 |
|||
container_name: pig-register |
|||
hostname: pig-register |
|||
image: pig-register |
|||
networks: |
|||
- spring_cloud_default |
|||
|
|||
pig-gateway: |
|||
build: |
|||
context: ./pig-gateway |
|||
restart: always |
|||
ports: |
|||
- 9999:9999 |
|||
container_name: pig-gateway |
|||
hostname: pig-gateway |
|||
image: pig-gateway |
|||
networks: |
|||
- spring_cloud_default |
|||
|
|||
pig-auth: |
|||
build: |
|||
context: ./pig-auth |
|||
restart: always |
|||
container_name: pig-auth |
|||
hostname: pig-auth |
|||
image: pig-auth |
|||
networks: |
|||
- spring_cloud_default |
|||
|
|||
pig-upms: |
|||
build: |
|||
context: ./pig-upms/pig-upms-biz |
|||
restart: always |
|||
container_name: pig-upms |
|||
hostname: pig-upms |
|||
image: pig-upms |
|||
networks: |
|||
- spring_cloud_default |
|||
|
|||
pig-monitor: |
|||
build: |
|||
context: ./pig-visual/pig-monitor |
|||
restart: always |
|||
ports: |
|||
- 5001:5001 |
|||
container_name: pig-monitor |
|||
hostname: pig-monitor |
|||
image: pig-monitor |
|||
networks: |
|||
- spring_cloud_default |
|||
|
|||
pig-codegen: |
|||
build: |
|||
context: ./pig-visual/pig-codegen |
|||
restart: always |
|||
container_name: pig-codegen |
|||
hostname: pig-codegen |
|||
image: pig-codegen |
|||
networks: |
|||
- spring_cloud_default |
|||
|
|||
pig-quartz: |
|||
build: |
|||
context: ./pig-visual/pig-quartz |
|||
restart: always |
|||
image: pig-quartz |
|||
container_name: pig-quartz |
|||
networks: |
|||
- spring_cloud_default |
|||
|
|||
networks: |
|||
spring_cloud_default: |
|||
name: spring_cloud_default |
|||
driver: bridge |
|||
@ -0,0 +1,282 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
|
|||
<!-- |
|||
~ Copyright (c) 2020 pig4cloud Authors. All Rights Reserved. |
|||
~ |
|||
~ Licensed under the Apache License, Version 2.0 (the "License"); |
|||
~ you may not use this file except in compliance with the License. |
|||
~ You may obtain a copy of the License at |
|||
~ |
|||
~ http://www.apache.org/licenses/LICENSE-2.0 |
|||
~ |
|||
~ Unless required by applicable law or agreed to in writing, software |
|||
~ distributed under the License is distributed on an "AS IS" BASIS, |
|||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|||
~ See the License for the specific language governing permissions and |
|||
~ limitations under the License. |
|||
--> |
|||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" |
|||
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>com.pig4cloud</groupId> |
|||
<artifactId>iec</artifactId> |
|||
<name>${project.artifactId}</name> |
|||
<version>${revision}</version> |
|||
<packaging>pom</packaging> |
|||
<url>https://www.pig4cloud.com</url> |
|||
|
|||
<properties> |
|||
<!-- 项目版本号 --> |
|||
<revision>3.8.1-JDK8</revision> |
|||
<spring-boot.version>2.7.18</spring-boot.version> |
|||
<spring-cloud.version>2021.0.8</spring-cloud.version> |
|||
<spring-cloud-alibaba.version>2021.0.6.1</spring-cloud-alibaba.version> |
|||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
|||
<maven.compiler.source>1.8</maven.compiler.source> |
|||
<maven.compiler.target>1.8</maven.compiler.target> |
|||
<spring-boot-admin.version>2.7.15</spring-boot-admin.version> |
|||
<spring.authorization.version>0.4.5</spring.authorization.version> |
|||
<captcha.version>2.2.3</captcha.version> |
|||
<screw.version>0.0.1</screw.version> |
|||
<lombok.version>1.18.30</lombok.version> |
|||
<velocity.version>2.3</velocity.version> |
|||
<velocity.tool.version>3.1</velocity.tool.version> |
|||
<configuration.version>1.10</configuration.version> |
|||
<jasypt.version>3.0.5</jasypt.version> |
|||
<knife4j.version>3.0.5</knife4j.version> |
|||
<springdoc.version>1.6.9</springdoc.version> |
|||
<xxl-job.version>2.4.0</xxl-job.version> |
|||
<docker.plugin.version>0.32.0</docker.plugin.version> |
|||
<docker.host>http://192.168.0.100:2375</docker.host> |
|||
<docker.registry>192.168.0.100</docker.registry> |
|||
<docker.namespace>pig4cloud</docker.namespace> |
|||
<docker.username>username</docker.username> |
|||
<docker.password>password</docker.password> |
|||
<git.commit.plugin>4.9.9</git.commit.plugin> |
|||
<spring.checkstyle.plugin>0.0.39</spring.checkstyle.plugin> |
|||
<flatten-maven-plugin.version>1.6.0</flatten-maven-plugin.version> |
|||
</properties> |
|||
|
|||
<!-- 以下依赖 全局所有的模块都会引入 --> |
|||
<dependencies> |
|||
<!--配置文件处理器--> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-configuration-processor</artifactId> |
|||
<optional>true</optional> |
|||
</dependency> |
|||
<!--配置文件加解密--> |
|||
<dependency> |
|||
<groupId>com.github.ulisesbocchio</groupId> |
|||
<artifactId>jasypt-spring-boot-starter</artifactId> |
|||
<version>${jasypt.version}</version> |
|||
</dependency> |
|||
<!--监控--> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-actuator</artifactId> |
|||
</dependency> |
|||
<!--监控客户端--> |
|||
<dependency> |
|||
<groupId>de.codecentric</groupId> |
|||
<artifactId>spring-boot-admin-starter-client</artifactId> |
|||
<version>${spring-boot-admin.version}</version> |
|||
</dependency> |
|||
<!--Lombok--> |
|||
<dependency> |
|||
<groupId>org.projectlombok</groupId> |
|||
<artifactId>lombok</artifactId> |
|||
<version>${lombok.version}</version> |
|||
<scope>provided</scope> |
|||
</dependency> |
|||
<!--测试依赖--> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-test</artifactId> |
|||
<scope>test</scope> |
|||
</dependency> |
|||
</dependencies> |
|||
|
|||
<modules> |
|||
<module>iec-register</module> |
|||
<module>iec-gateway</module> |
|||
<module>iec-auth</module> |
|||
<module>iec-upms</module> |
|||
<module>iec-common</module> |
|||
</modules> |
|||
|
|||
<dependencyManagement> |
|||
<dependencies> |
|||
<!--pig 公共版本定义--> |
|||
<dependency> |
|||
<groupId>com.pig4cloud</groupId> |
|||
<artifactId>iec-common-bom</artifactId> |
|||
<version>${project.version}</version> |
|||
<type>pom</type> |
|||
<scope>import</scope> |
|||
</dependency> |
|||
<!-- spring boot 依赖 --> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-dependencies</artifactId> |
|||
<version>${spring-boot.version}</version> |
|||
<type>pom</type> |
|||
<scope>import</scope> |
|||
</dependency> |
|||
<!-- spring cloud 依赖 --> |
|||
<dependency> |
|||
<groupId>org.springframework.cloud</groupId> |
|||
<artifactId>spring-cloud-dependencies</artifactId> |
|||
<version>${spring-cloud.version}</version> |
|||
<type>pom</type> |
|||
<scope>import</scope> |
|||
</dependency> |
|||
<!-- spring cloud alibaba 依赖 --> |
|||
<dependency> |
|||
<groupId>com.alibaba.cloud</groupId> |
|||
<artifactId>spring-cloud-alibaba-dependencies</artifactId> |
|||
<version>${spring-cloud-alibaba.version}</version> |
|||
<type>pom</type> |
|||
<scope>import</scope> |
|||
</dependency> |
|||
</dependencies> |
|||
</dependencyManagement> |
|||
|
|||
<build> |
|||
<finalName>${project.name}</finalName> |
|||
<resources> |
|||
<resource> |
|||
<directory>src/main/resources</directory> |
|||
<filtering>true</filtering> |
|||
</resource> |
|||
</resources> |
|||
<pluginManagement> |
|||
<plugins> |
|||
<plugin> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-maven-plugin</artifactId> |
|||
<version>${spring-boot.version}</version> |
|||
<configuration> |
|||
<finalName>${project.build.finalName}</finalName> |
|||
<layers> |
|||
<enabled>true</enabled> |
|||
</layers> |
|||
</configuration> |
|||
<executions> |
|||
<execution> |
|||
<goals> |
|||
<goal>repackage</goal> |
|||
</goals> |
|||
</execution> |
|||
</executions> |
|||
</plugin> |
|||
<plugin> |
|||
<groupId>io.fabric8</groupId> |
|||
<artifactId>docker-maven-plugin</artifactId> |
|||
<version>${docker.plugin.version}</version> |
|||
<configuration> |
|||
<!-- Docker Remote Api--> |
|||
<dockerHost>${docker.host}</dockerHost> |
|||
<!-- Docker 镜像私服--> |
|||
<registry>${docker.registry}</registry> |
|||
<!-- 认证信息--> |
|||
<authConfig> |
|||
<push> |
|||
<username>${docker.username}</username> |
|||
<password>${docker.password}</password> |
|||
</push> |
|||
</authConfig> |
|||
<images> |
|||
<image> |
|||
<!-- 镜像名称: 172.17.0.111/library/pig-gateway:2.6.3--> |
|||
<name>${docker.registry}/${docker.namespace}/${project.name}:${project.version}</name> |
|||
<build> |
|||
<dockerFile>${project.basedir}/Dockerfile</dockerFile> |
|||
</build> |
|||
</image> |
|||
</images> |
|||
</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>resolveCiFriendliesOnly</flattenMode> |
|||
<updatePomFile>true</updatePomFile> |
|||
</configuration> |
|||
<executions> |
|||
<execution> |
|||
<id>flatten</id> |
|||
<phase>process-resources</phase> |
|||
<goals> |
|||
<goal>flatten</goal> |
|||
</goals> |
|||
</execution> |
|||
<execution> |
|||
<id>flatten.clean</id> |
|||
<phase>clean</phase> |
|||
<goals> |
|||
<goal>clean</goal> |
|||
</goals> |
|||
</execution> |
|||
</executions> |
|||
</plugin> |
|||
<!--打包jar 与git commit 关联插件--> |
|||
<plugin> |
|||
<groupId>io.github.git-commit-id</groupId> |
|||
<artifactId>git-commit-id-maven-plugin</artifactId> |
|||
<version>${git.commit.plugin}</version> |
|||
<executions> |
|||
<execution> |
|||
<id>get-the-git-infos</id> |
|||
<goals> |
|||
<goal>revision</goal> |
|||
</goals> |
|||
<phase>initialize</phase> |
|||
</execution> |
|||
</executions> |
|||
<configuration> |
|||
<failOnNoGitDirectory>false</failOnNoGitDirectory> |
|||
<generateGitPropertiesFile>true</generateGitPropertiesFile> |
|||
<!--因为项目定制了jackson的日期时间序列化/反序列化格式,因此这里要进行配置,不然通过management.info.git.mode=full进行完整git信息监控时会存在问题--> |
|||
<dateFormat>yyyy-MM-dd HH:mm:ss</dateFormat> |
|||
<includeOnlyProperties> |
|||
<includeOnlyProperty>^git.build.(time|version)$</includeOnlyProperty> |
|||
<includeOnlyProperty>^git.commit.(id|message|time).*$</includeOnlyProperty> |
|||
</includeOnlyProperties> |
|||
</configuration> |
|||
</plugin> |
|||
<!-- |
|||
代码格式插件,默认使用spring 规则,可运行命令进行项目格式化:./mvnw spring-javaformat:apply 或 mvn spring-javaformat:apply,可在IDEA中安装插件以下插件进行自动格式化: |
|||
https://repo1.maven.org/maven2/io/spring/javaformat/spring-javaformat-intellij-idea-plugin |
|||
--> |
|||
<plugin> |
|||
<groupId>io.spring.javaformat</groupId> |
|||
<artifactId>spring-javaformat-maven-plugin</artifactId> |
|||
<version>${spring.checkstyle.plugin}</version> |
|||
</plugin> |
|||
</plugins> |
|||
</build> |
|||
|
|||
<profiles> |
|||
<profile> |
|||
<id>cloud</id> |
|||
<properties> |
|||
<!-- 环境标识,需要与配置文件的名称相对应 --> |
|||
<profiles.active>dev</profiles.active> |
|||
<nacos.username>nacos</nacos.username> |
|||
<nacos.password>nacos</nacos.password> |
|||
</properties> |
|||
<activation> |
|||
<!-- 默认环境 --> |
|||
<activeByDefault>true</activeByDefault> |
|||
</activation> |
|||
</profile> |
|||
</profiles> |
|||
</project> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue