From ac840f0391ce777f542a76f527848b0caafbff1e Mon Sep 17 00:00:00 2001
From: fuzhengwei <184172133@qq.com>
Date: Wed, 25 Mar 2026 08:13:15 +0800
Subject: [PATCH] feat: ddd
---
scaffold-lite/pom.xml | 7 +-
.../__rootArtifactId__-app/Dockerfile | 2 +-
scaffold-std/.gitignore | 38 ++
scaffold-std/README.md | 191 ++++++++++
scaffold-std/pom.xml | 345 ++++++++++++++++++
scaffold-std/src/main/java/Api.java | 3 +
.../META-INF/maven/archetype-metadata.xml | 116 ++++++
.../resources/archetype-resources/README.md | 10 +
.../__rootArtifactId__-api/pom.xml | 36 ++
.../src/main/java/api/dto/package-info.java | 7 +
.../src/main/java/api/package-info.java | 7 +
.../src/main/java/api/response/Response.java | 25 ++
.../__rootArtifactId__-app/.local-config | 2 +
.../__rootArtifactId__-app/Dockerfile | 18 +
.../__rootArtifactId__-app/build.sh | 9 +
.../__rootArtifactId__-app/pom.xml | 137 +++++++
.../__rootArtifactId__-app/push.sh | 41 +++
.../src/main/java/Application.java | 18 +
.../src/main/java/config/GuavaConfig.java | 23 ++
.../main/java/config/ThreadPoolConfig.java | 53 +++
.../config/ThreadPoolConfigProperties.java | 29 ++
.../src/main/java/config/package-info.java | 9 +
.../src/main/java/package-info.java | 7 +
.../src/main/resources/application-dev.yml | 45 +++
.../src/main/resources/application-prod.yml | 44 +++
.../src/main/resources/application-test.yml | 44 +++
.../src/main/resources/application.yml | 8 +
.../src/main/resources/logback-spring.xml | 116 ++++++
.../mybatis/config/mybatis-config.xml | 12 +
.../mybatis/mapper/frame_case_mapper.xml | 28 ++
.../src/test/java/test/ApiTest.java | 22 ++
.../__rootArtifactId__-case/pom.xml | 32 ++
.../src/main/java/cases/IXxxCaseService.java | 10 +
.../src/main/java/cases/IYyyCaseService.java | 10 +
.../src/main/java/cases/package-info.java | 7 +
.../main/java/cases/xxx/XxxCaseService.java | 13 +
.../src/main/java/cases/xxx/package-info.java | 7 +
.../main/java/cases/yyy/YyyCaseService.java | 14 +
.../src/main/java/cases/yyy/package-info.java | 7 +
.../__rootArtifactId__-domain/pom.xml | 63 ++++
.../java/domain/xxx/adapter/package-info.java | 7 +
.../domain/xxx/adapter/port/package-info.java | 7 +
.../xxx/adapter/repository/package-info.java | 8 +
.../xxx/model/aggregate/package-info.java | 10 +
.../domain/xxx/model/entity/package-info.java | 10 +
.../domain/xxx/model/valobj/package-info.java | 9 +
.../java/domain/xxx/service/package-info.java | 4 +
.../yyy/adapter/repository/package-info.java | 0
.../yyy/model/aggregate/package-info.java | 10 +
.../domain/yyy/model/entity/package-info.java | 10 +
.../domain/yyy/model/valobj/package-info.java | 9 +
.../java/domain/yyy/service/package-info.java | 4 +
.../__rootArtifactId__-infrastructure/pom.xml | 34 ++
.../adapter/port/package-info.java | 7 +
.../adapter/repository/package-info.java | 7 +
.../java/infrastructure/dao/package-info.java | 7 +
.../infrastructure/dao/po/package-info.java | 7 +
.../gateway/dto/package-info.java | 0
.../infrastructure/gateway/package-info.java | 7 +
.../infrastructure/redis/package-info.java | 7 +
.../__rootArtifactId__-trigger/pom.xml | 53 +++
.../main/java/trigger/http/package-info.java | 7 +
.../main/java/trigger/job/package-info.java | 7 +
.../java/trigger/listener/package-info.java | 8 +
.../__rootArtifactId__-types/pom.xml | 39 ++
.../src/main/java/types/common/Constants.java | 10 +
.../main/java/types/enums/ResponseCode.java | 23 ++
.../java/types/exception/AppException.java | 49 +++
.../docs/dev-ops/app/start.sh | 20 +
.../docs/dev-ops/app/stop.sh | 1 +
.../docs/dev-ops/docker-compose-app.yml | 27 ++
.../docker-compose-environment-aliyun.yml | 88 +++++
.../dev-ops/docker-compose-environment.yml | 87 +++++
.../docs/dev-ops/mysql/my.cnf | 24 ++
.../dev-ops/mysql/sql/xfg-frame-archetype.sql | 108 ++++++
.../docs/dev-ops/redis/redis.conf | 2 +
.../resources/archetype-resources/pom.xml | 209 +++++++++++
.../projects/basic/archetype.properties | 10 +
.../test/resources/projects/basic/goal.txt | 0
79 files changed, 2547 insertions(+), 4 deletions(-)
create mode 100644 scaffold-std/.gitignore
create mode 100644 scaffold-std/README.md
create mode 100644 scaffold-std/pom.xml
create mode 100644 scaffold-std/src/main/java/Api.java
create mode 100644 scaffold-std/src/main/resources/META-INF/maven/archetype-metadata.xml
create mode 100644 scaffold-std/src/main/resources/archetype-resources/README.md
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-api/pom.xml
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/api/dto/package-info.java
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/api/package-info.java
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/api/response/Response.java
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/.local-config
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/Dockerfile
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/build.sh
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/pom.xml
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/push.sh
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/Application.java
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/config/GuavaConfig.java
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/config/ThreadPoolConfig.java
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/config/ThreadPoolConfigProperties.java
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/config/package-info.java
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/package-info.java
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/application-dev.yml
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/application-prod.yml
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/application-test.yml
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/application.yml
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/logback-spring.xml
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/mybatis/config/mybatis-config.xml
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/mybatis/mapper/frame_case_mapper.xml
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/test/java/test/ApiTest.java
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-case/pom.xml
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-case/src/main/java/cases/IXxxCaseService.java
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-case/src/main/java/cases/IYyyCaseService.java
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-case/src/main/java/cases/package-info.java
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-case/src/main/java/cases/xxx/XxxCaseService.java
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-case/src/main/java/cases/xxx/package-info.java
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-case/src/main/java/cases/yyy/YyyCaseService.java
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-case/src/main/java/cases/yyy/package-info.java
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/pom.xml
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/xxx/adapter/package-info.java
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/xxx/adapter/port/package-info.java
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/xxx/adapter/repository/package-info.java
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/xxx/model/aggregate/package-info.java
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/xxx/model/entity/package-info.java
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/xxx/model/valobj/package-info.java
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/xxx/service/package-info.java
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/yyy/adapter/repository/package-info.java
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/yyy/model/aggregate/package-info.java
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/yyy/model/entity/package-info.java
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/yyy/model/valobj/package-info.java
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/yyy/service/package-info.java
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/pom.xml
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/adapter/port/package-info.java
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/adapter/repository/package-info.java
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/dao/package-info.java
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/dao/po/package-info.java
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/gateway/dto/package-info.java
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/gateway/package-info.java
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/redis/package-info.java
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-trigger/pom.xml
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-trigger/src/main/java/trigger/http/package-info.java
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-trigger/src/main/java/trigger/job/package-info.java
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-trigger/src/main/java/trigger/listener/package-info.java
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-types/pom.xml
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-types/src/main/java/types/common/Constants.java
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-types/src/main/java/types/enums/ResponseCode.java
create mode 100644 scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-types/src/main/java/types/exception/AppException.java
create mode 100644 scaffold-std/src/main/resources/archetype-resources/docs/dev-ops/app/start.sh
create mode 100644 scaffold-std/src/main/resources/archetype-resources/docs/dev-ops/app/stop.sh
create mode 100644 scaffold-std/src/main/resources/archetype-resources/docs/dev-ops/docker-compose-app.yml
create mode 100644 scaffold-std/src/main/resources/archetype-resources/docs/dev-ops/docker-compose-environment-aliyun.yml
create mode 100644 scaffold-std/src/main/resources/archetype-resources/docs/dev-ops/docker-compose-environment.yml
create mode 100644 scaffold-std/src/main/resources/archetype-resources/docs/dev-ops/mysql/my.cnf
create mode 100644 scaffold-std/src/main/resources/archetype-resources/docs/dev-ops/mysql/sql/xfg-frame-archetype.sql
create mode 100644 scaffold-std/src/main/resources/archetype-resources/docs/dev-ops/redis/redis.conf
create mode 100644 scaffold-std/src/main/resources/archetype-resources/pom.xml
create mode 100644 scaffold-std/src/test/resources/projects/basic/archetype.properties
create mode 100644 scaffold-std/src/test/resources/projects/basic/goal.txt
diff --git a/scaffold-lite/pom.xml b/scaffold-lite/pom.xml
index 563b72b..c580c0d 100644
--- a/scaffold-lite/pom.xml
+++ b/scaffold-lite/pom.xml
@@ -5,7 +5,8 @@
io.github.fuzhengwei
ddd-scaffold-lite-jdk17
- 1.5
+
+ 1.6
maven-archetype
@@ -34,7 +35,7 @@
fuzhengwei
184172133@qq.com
https://github.com/fuzhengwei
- xfg-wrench
+ ddd-scaffold-lite
https://github.com/fuzhengwei/ddd-scaffold-lite
Project Manager
@@ -45,7 +46,7 @@
- 1.8
+ 17
3.2.0
3.2.1
1.6
diff --git a/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/Dockerfile b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/Dockerfile
index faeac44..ee3bf4f 100644
--- a/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/Dockerfile
+++ b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/Dockerfile
@@ -1,5 +1,5 @@
# 基础镜像,可以先执行 docker pull openjdk:17-jdk-slim
-FROM openjdk:17-jdk-slim
+FROM registry.cn-hangzhou.aliyuncs.com/xfg-studio/openjdk:17-jdk-slim
# 作者
MAINTAINER xiaofuge
diff --git a/scaffold-std/.gitignore b/scaffold-std/.gitignore
new file mode 100644
index 0000000..5ff6309
--- /dev/null
+++ b/scaffold-std/.gitignore
@@ -0,0 +1,38 @@
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### IntelliJ IDEA ###
+.idea/modules.xml
+.idea/jarRepositories.xml
+.idea/compiler.xml
+.idea/libraries/
+*.iws
+*.iml
+*.ipr
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store
\ No newline at end of file
diff --git a/scaffold-std/README.md b/scaffold-std/README.md
new file mode 100644
index 0000000..58374f5
--- /dev/null
+++ b/scaffold-std/README.md
@@ -0,0 +1,191 @@
+# xfg-frame-archetype - DDD 脚手架
+
+**主要**:提供了在线版,可直接使用 [https://bugstack.cn/md/road-map/ddd-archetype-maven.html](https://bugstack.cn/md/road-map/ddd-archetype-maven.html)
+
+**提示**:本地构建,可注释掉 pom.xml 中的提示给你报错的配置。那些是为了发包使用的,你本机缺少则没法构建。但可以注释掉。如果你干了很久,还没干懂。可以找技术暖男小傅哥(fustack)
+
+## 1. 脚手架安装使用
+
+### 1. 生成
+
+```shell
+md5 ddd-scaffold-lite-jdk17-1.1.pom > ddd-scaffold-lite-jdk17-1.1.pom.md5
+shasum ddd-scaffold-lite-jdk17-1.1.pom > ddd-scaffold-lite-jdk17-1.1.pom.sha1
+```
+
+```shell
+mvn clean install
+```
+- 先发jar 后发maven-archetype 注意发布jar到maven仓库需要等待
+
+```shell
+mvn clean install net.ju-n.maven.plugins:checksum-maven-plugin:1.2:artifacts
+```
+
+```shell
+mvn deploy
+```
+
+```shell
+jar -cvf bundle.jar scaffold-lite-1.0.pom scaffold-lite-1.0.pom.asc scaffold-lite-1.0.jar scaffold-lite-1.0.jar.asc scaffold-lite-1.0-javadoc.jar scaffold-lite-1.0-javadoc.jar.asc scaffold-lite-1.0-sources.jar scaffold-lite-1.0-sources.jar.asc
+```
+
+```shell[archetype-catalog.xml](..%2F..%2F..%2F..%2Fapache-maven-3.8.6%2Frepository%2Farchetype-catalog.xml)
+mvn archetype:crawl
+```
+
+```shell
+mvn deploy:deploy-file \
+ -DgroupId=cn.bugstack \
+ -DartifactId=ascaffold-lite \
+ -Dversion=6.0 \
+ -Dpackaging=xml \
+ -Dfile=/Users/fuzhengwei1/Documents/develop/github/xfg-studio/xfg-frame-archetype-lite/docs/archetype-catalog.xml \
+ -Durl=https://packages.aliyun.com/maven/repository/2452122-release-dbuebF \
+ -DrepositoryId=2452122-release-dbuebF
+```
+
+```shell
+mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate
+-DarchetypeGroupId=cn.bugstack
+-DarchetypeArtifactId=scaffold-lite
+-DarchetypeCatalog=https://packages.aliyun.com/maven/repository/2452122-release-dbuebF/
+-DarchetypeVersion=6.0
+-DgroupId=com.xfg.testdemo
+-DartifactId=testdemo
+-Dversion=0.0.1-SNAPSHOT
+```
+
+- 在 IntelliJ IDEA 执行 `mvn clean install` 这样会把脚手架安装到本地仓库中
+
+### 2. 配置
+
+```shell
+/Users/fuzhengwei/Documents/develop/apache-maven-3.8.6/repository
+```
+
+- 把你的 Maven 路径的 repository 配置到 IntelliJ IDEA 创建 Maven 工程的路径下。
+
+## 2. 工程结构介绍
+
+```java
+.
+├── README.md
+├── docs
+│ └── dev-ops
+│ ├── app
+│ │ └── docker-compose-1.0.yml
+│ └── mysql
+│ ├── docker-compose.yml
+│ └── sql
+│ └── xfg-frame-archetype.sql
+├── pom.xml
+├── xfg-ddd-app
+│ ├── Dockerfile
+│ ├── build.sh
+│ ├── pom.xml
+│ ├── src
+│ │ ├── main
+│ │ │ ├── java
+│ │ │ │ └── cn
+│ │ │ │ └── bugstack
+│ │ │ │ ├── Application.java
+│ │ │ │ ├── config
+│ │ │ │ │ ├── GuavaConfig.java
+│ │ │ │ │ ├── ThreadPoolConfig.java
+│ │ │ │ │ ├── ThreadPoolConfigProperties.java
+│ │ │ │ │ └── package-info.java
+│ │ │ │ └── package-info.java
+│ │ │ └── resources
+│ │ │ ├── application-dev.yml
+│ │ │ ├── application-prod.yml
+│ │ │ ├── application-test.yml
+│ │ │ ├── application.yml
+│ │ │ ├── logback-spring.xml
+│ │ │ └── mybatis
+│ │ │ ├── config
+│ │ │ │ └── mybatis-config.xml
+│ │ │ └── mapper
+│ │ │ └── frame_case_mapper.xml
+│ │ └── test
+│ │ └── java
+│ │ └── cn
+│ │ └── bugstack
+│ │ └── test
+│ │ └── ApiTest.java
+│ ├── start.sh
+│ └── stop.sh
+├── xfg-ddd-domain
+│ ├── pom.xml
+│ └── src
+│ └── main
+│ └── java
+│ └── cn
+│ └── bugstack
+│ └── domain
+│ ├── xxx
+│ │ ├── adapter
+│ │ │ └── package-info.java
+│ │ ├── model
+│ │ │ ├── aggregate
+│ │ │ │ └── package-info.java
+│ │ │ ├── entity
+│ │ │ │ └── package-info.java
+│ │ │ └── valobj
+│ │ │ └── package-info.java
+│ │ ├── repository
+│ │ │ └── package-info.java
+│ │ └── service
+│ │ └── package-info.java
+│ └── yyy
+│ ├── model
+│ │ ├── aggregate
+│ │ │ └── package-info.java
+│ │ ├── entity
+│ │ │ └── package-info.java
+│ │ └── valobj
+│ │ └── package-info.java
+│ ├── repository
+│ │ └── package-info.java
+│ └── service
+│ └── package-info.java
+├── xfg-ddd-infrastructure
+│ ├── pom.xml
+│ └── src
+│ └── main
+│ └── java
+│ └── cn
+│ └── bugstack
+│ └── infrastructure
+│ ├── gateway
+│ │ ├── adapter
+│ │ │ └── package-info.java
+│ │ ├── api
+│ │ │ └── package-info.java
+│ │ └── dto
+│ │ └── package-info.java
+│ └── persistent
+│ ├── dao
+│ │ └── package-info.java
+│ ├── po
+│ │ └── package-info.java
+│ └── repository
+│ └── package-info.java
+├── xfg-ddd-trigger
+│ ├── pom.xml
+│ └── src
+│ └── main
+│ └── java
+│ └── cn
+│ └── bugstack
+│ └── trigger
+│ ├── http
+│ │ └── package-info.java
+│ ├── job
+│ │ └── package-info.java
+│ └── listener
+│ └── package-info.java
+└── xfg-ddd-types
+```
+
+
diff --git a/scaffold-std/pom.xml b/scaffold-std/pom.xml
new file mode 100644
index 0000000..b70bba4
--- /dev/null
+++ b/scaffold-std/pom.xml
@@ -0,0 +1,345 @@
+
+
+ 4.0.0
+
+ io.github.fuzhengwei
+ ddd-scaffold-std-jdk17
+ 1.6
+ maven-archetype
+
+
+ ddd-scaffold-lite-jdk17
+ https://github.com/fuzhengwei/ddd-scaffold-lite
+ ddd scaffold lite ddd jdk 17 by xiaofuge
+
+
+ scm:git:https://github.com/spring-projects/spring-boot/xfg-frame-archetype.git
+ scm:git:https://github.com/spring-projects/spring-boot/xfg-frame-archetype.git
+ HEAD
+ https://github.com/spring-projects/spring-boot/xfg-frame-archetype
+
+
+
+
+ Apache
+ https://opensource.org/license/apache-2-0/
+ repo
+
+
+
+
+
+ ossrh
+ fuzhengwei
+ 184172133@qq.com
+ https://github.com/fuzhengwei
+ ddd-scaffold-lite
+ https://github.com/fuzhengwei/ddd-scaffold-lite
+
+ Project Manager
+ Developer
+
+ Asia/Shanghai
+
+
+
+
+ 17
+ 3.2.0
+ 3.2.1
+ 1.6
+ 1.10
+
+
+
+
+
+
+
+
+
+ org.apache.maven.archetype
+ archetype-packaging
+ 3.2.0
+
+
+
+
+ org.apache.maven.plugins
+ maven-resources-plugin
+ 3.2.0
+
+ UTF-8
+
+
+ src/main/resources
+ false
+
+
+
+
+
+
+
+ org.sonatype.central
+ central-publishing-maven-plugin
+ 0.4.0
+ true
+
+ ossrh
+ true
+ true
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+ 2.2.1
+
+
+ attach-sources
+
+ jar-no-fork
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 2.9.1
+
+ UTF-8
+ UTF-8
+ UTF-8
+ -Xdoclint:none
+
+
+
+ attach-javadocs
+ package
+
+ jar
+
+
+ -Xdoclint:none
+
+ ${java.home}${file.separator}..${file.separator}bin${file.separator}javadoc
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-shade-plugin
+ 3.2.4
+
+
+ package
+
+ shade
+
+
+
+
+ *:*
+
+ META-INF/*.SF
+ META-INF/*.DSA
+ META-INF/*.RSA
+
+
+
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+ 1.5
+
+
+ ossrh
+
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+
+
+
+
+ net.nicoulaj.maven.plugins
+ checksum-maven-plugin
+ 1.10
+
+
+ create-checksums
+
+ artifacts
+
+
+
+ MD5
+ SHA-1
+
+ true
+
+
+
+ create-pom-checksums
+
+ files
+
+
+
+
+ ${project.build.directory}
+
+ *.pom
+
+
+
+
+ MD5
+ SHA-1
+
+
+
+
+
+
+
+
+
diff --git a/scaffold-std/src/main/java/Api.java b/scaffold-std/src/main/java/Api.java
new file mode 100644
index 0000000..65c98cf
--- /dev/null
+++ b/scaffold-std/src/main/java/Api.java
@@ -0,0 +1,3 @@
+
+public class Api {
+}
diff --git a/scaffold-std/src/main/resources/META-INF/maven/archetype-metadata.xml b/scaffold-std/src/main/resources/META-INF/maven/archetype-metadata.xml
new file mode 100644
index 0000000..252a01b
--- /dev/null
+++ b/scaffold-std/src/main/resources/META-INF/maven/archetype-metadata.xml
@@ -0,0 +1,116 @@
+
+
+
+
+
+ docs/dev-ops
+
+ **/*.yml
+
+
+
+ docs/dev-ops
+
+ **/*.sql
+ **/*.yml
+ **/*.sh
+
+
+
+
+
+ README.md
+ __gitignore__
+
+
+
+
+
+
+
+
+ src/main/java
+
+ **/*.java
+
+
+
+
+
+
+
+ src/main/java
+
+ **/*.java
+
+
+
+ src/main/resources
+
+ **/*.xml
+ **/*.yml
+
+
+
+ src/test/java
+
+ **/*.java
+
+
+
+
+
+ Dockerfile
+ *.sh
+
+
+
+
+
+
+
+ src/main/java
+
+ **/*.java
+
+
+
+
+
+
+
+ src/main/java
+
+ **/*.java
+
+
+
+
+
+
+
+ src/main/java
+
+ **/*.java
+
+
+
+
+
+
+
+ src/main/java
+
+ **/*.java
+
+
+
+
+
+
diff --git a/scaffold-std/src/main/resources/archetype-resources/README.md b/scaffold-std/src/main/resources/archetype-resources/README.md
new file mode 100644
index 0000000..35e0c19
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/README.md
@@ -0,0 +1,10 @@
+# xfg-frame-archetype - DDD 脚手架 - @小傅哥 v2.2
+
+- docker 使用文档:[https://bugstack.cn/md/road-map/docker.html](https://bugstack.cn/md/road-map/docker.html)
+- DDD 教程;
+ - [DDD 概念理论](https://bugstack.cn/md/road-map/ddd-guide-01.html)
+ - [DDD 建模方法](https://bugstack.cn/md/road-map/ddd-guide-02.html)
+ - [DDD 工程模型](https://bugstack.cn/md/road-map/ddd-guide-03.html)
+ - [DDD 架构设计](https://bugstack.cn/md/road-map/ddd.html)
+ - [DDD 建模案例](https://bugstack.cn/md/road-map/ddd-model.html)
+
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-api/pom.xml b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-api/pom.xml
new file mode 100644
index 0000000..978eb3c
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-api/pom.xml
@@ -0,0 +1,36 @@
+
+
+ 4.0.0
+
+ ${groupId}
+ ${rootArtifactId}
+ ${version}
+
+
+ ${artifactId}
+
+
+
+ org.projectlombok
+ lombok
+
+
+ jakarta.validation
+ jakarta.validation-api
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+ ${java.version}
+ ${java.version}
+
+
+
+
+
+
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/api/dto/package-info.java b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/api/dto/package-info.java
new file mode 100644
index 0000000..8a09c58
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/api/dto/package-info.java
@@ -0,0 +1,7 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * 数据传输对象 xxxRequestDTO xxxResponseDTO
+ */
+package ${package}.api.dto;
\ No newline at end of file
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/api/package-info.java b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/api/package-info.java
new file mode 100644
index 0000000..2bb5fc1
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/api/package-info.java
@@ -0,0 +1,7 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * 定义api接口
+ */
+package ${package}.api;
\ No newline at end of file
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/api/response/Response.java b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/api/response/Response.java
new file mode 100644
index 0000000..2db4a77
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/api/response/Response.java
@@ -0,0 +1,25 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+package ${package}.api.response;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+
+@Data
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+public class Response implements Serializable {
+
+ private static final long serialVersionUID = 7000723935764546321L;
+
+ private String code;
+ private String info;
+ private T data;
+
+}
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/.local-config b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/.local-config
new file mode 100644
index 0000000..48812d6
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/.local-config
@@ -0,0 +1,2 @@
+ALIYUN_USERNAME=你的账号
+ALIYUN_PASSWORD=你的密码
\ No newline at end of file
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/Dockerfile b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/Dockerfile
new file mode 100644
index 0000000..ee3bf4f
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/Dockerfile
@@ -0,0 +1,18 @@
+# 基础镜像,可以先执行 docker pull openjdk:17-jdk-slim
+FROM registry.cn-hangzhou.aliyuncs.com/xfg-studio/openjdk:17-jdk-slim
+
+# 作者
+MAINTAINER xiaofuge
+
+# 配置
+ENV PARAMS=""
+
+# 时区
+ENV TZ=PRC
+RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
+
+# 添加应用
+ADD target/${artifactId}.jar /${artifactId}.jar
+
+## 在镜像运行为容器后执行的命令
+ENTRYPOINT ["sh","-c","java -jar $JAVA_OPTS /${artifactId}.jar $PARAMS"]
\ No newline at end of file
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/build.sh b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/build.sh
new file mode 100644
index 0000000..0d9734d
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/build.sh
@@ -0,0 +1,9 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+
+# 普通镜像构建,随系统版本构建 amd/arm
+docker build -t system/${artifactId}:${version} -f ./Dockerfile .
+
+# 兼容 amd、arm 构建镜像
+# docker buildx build --load --platform liunx/amd64,linux/arm64 -t xiaofuge/xfg-frame-archetype-app:1.0 -f ./Dockerfile . --push
\ No newline at end of file
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/pom.xml b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/pom.xml
new file mode 100644
index 0000000..46333be
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/pom.xml
@@ -0,0 +1,137 @@
+
+
+ 4.0.0
+
+ ${groupId}
+ ${rootArtifactId}
+ ${version}
+
+
+ ${artifactId}
+
+ jar
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+ org.apache.tomcat.embed
+ tomcat-embed-core
+
+
+ org.springframework.boot
+ spring-boot-configuration-processor
+
+
+ org.mybatis.spring.boot
+ mybatis-spring-boot-starter
+
+
+
+ mysql
+ mysql-connector-java
+
+
+ com.alibaba
+ fastjson
+
+
+ org.apache.commons
+ commons-lang3
+
+
+ org.projectlombok
+ lombok
+
+
+ com.google.guava
+ guava
+
+
+ junit
+ junit
+ test
+
+
+ io.jsonwebtoken
+ jjwt
+
+
+ com.auth0
+ java-jwt
+
+
+ commons-codec
+ commons-codec
+
+
+ com.squareup.retrofit2
+ converter-gson
+ 2.9.0
+
+
+
+
+ ${groupId}
+ ${rootArtifactId}-trigger
+
+
+ ${groupId}
+ ${rootArtifactId}-infrastructure
+
+
+
+
+ ${rootArtifactId}-app
+
+
+ src/main/resources
+ true
+
+ **/**
+
+
+
+
+
+ src/test/resources
+ true
+
+ **/**
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+ 2.6
+
+ true
+ false
+
+ **/*Test.java
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+ ${groupId}.Application
+ JAR
+
+
+
+
+
+
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/push.sh b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/push.sh
new file mode 100644
index 0000000..cff35ce
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/push.sh
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+# https://cr.console.aliyun.com/cn-hangzhou/instance/credentials
+
+# Ensure the script exits if any command fails
+set -e
+
+# Define variables for the registry and image
+ALIYUN_REGISTRY="registry.cn-hangzhou.aliyuncs.com"
+NAMESPACE="system"
+IMAGE_NAME="${artifactId}"
+IMAGE_TAG="${version}"
+
+# 读取本地配置文件
+if [ -f ".local-config" ]; then
+ source .local-config
+else
+ echo ".local-config 文件不存在,请创建并填写 ALIYUN_USERNAME 和 ALIYUN_PASSWORD"
+ exit 1
+fi
+
+# Login to Aliyun Docker Registry
+echo "Logging into Aliyun Docker Registry..."
+docker login --username="${ALIYUN_USERNAME}" --password="${ALIYUN_PASSWORD}" $ALIYUN_REGISTRY
+
+# Tag the Docker image
+echo "Tagging the Docker image..."
+docker tag ${NAMESPACE}/${IMAGE_NAME}:${IMAGE_TAG} ${ALIYUN_REGISTRY}/${NAMESPACE}/${IMAGE_NAME}:${IMAGE_TAG}
+
+# Push the Docker image to Aliyun
+echo "Pushing the Docker image to Aliyun..."
+docker push ${ALIYUN_REGISTRY}/${NAMESPACE}/${IMAGE_NAME}:${IMAGE_TAG}
+
+echo "Docker image pushed successfully! "
+
+echo "检出地址:docker pull ${ALIYUN_REGISTRY}/${NAMESPACE}/${IMAGE_NAME}:${IMAGE_TAG}"
+echo "标签设置:docker tag ${ALIYUN_REGISTRY}/${NAMESPACE}/${IMAGE_NAME}:${IMAGE_TAG} ${NAMESPACE}/${IMAGE_NAME}:${IMAGE_TAG}"
+
+# Logout from Aliyun Docker Registry
+echo "Logging out from Aliyun Docker Registry..."
+docker logout $ALIYUN_REGISTRY
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/Application.java b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/Application.java
new file mode 100644
index 0000000..7dbb4d1
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/Application.java
@@ -0,0 +1,18 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+package ${package};
+
+import org.springframework.beans.factory.annotation.Configurable;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+@Configurable
+public class Application {
+
+ public static void main(String[] args){
+ SpringApplication.run(Application.class);
+ }
+
+}
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/config/GuavaConfig.java b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/config/GuavaConfig.java
new file mode 100644
index 0000000..4a804f9
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/config/GuavaConfig.java
@@ -0,0 +1,23 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+package ${package}.config;
+
+import com.google.common.cache.Cache;
+import com.google.common.cache.CacheBuilder;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import java.util.concurrent.TimeUnit;
+
+@Configuration
+public class GuavaConfig {
+
+ @Bean(name = "cache")
+ public Cache cache() {
+ return CacheBuilder.newBuilder()
+ .expireAfterWrite(3, TimeUnit.SECONDS)
+ .build();
+ }
+
+}
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/config/ThreadPoolConfig.java b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/config/ThreadPoolConfig.java
new file mode 100644
index 0000000..4852cdd
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/config/ThreadPoolConfig.java
@@ -0,0 +1,53 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+package ${package}.config;
+
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.scheduling.annotation.EnableAsync;
+
+import java.util.concurrent.*;
+
+@Slf4j
+@EnableAsync
+@Configuration
+@EnableConfigurationProperties(ThreadPoolConfigProperties.class)
+public class ThreadPoolConfig {
+
+ @Bean
+ @ConditionalOnMissingBean(ThreadPoolExecutor.class)
+ public ThreadPoolExecutor threadPoolExecutor(ThreadPoolConfigProperties properties) throws ClassNotFoundException, InstantiationException, IllegalAccessException {
+ // 实例化策略
+ RejectedExecutionHandler handler;
+ switch (properties.getPolicy()){
+ case "AbortPolicy":
+ handler = new ThreadPoolExecutor.AbortPolicy();
+ break;
+ case "DiscardPolicy":
+ handler = new ThreadPoolExecutor.DiscardPolicy();
+ break;
+ case "DiscardOldestPolicy":
+ handler = new ThreadPoolExecutor.DiscardOldestPolicy();
+ break;
+ case "CallerRunsPolicy":
+ handler = new ThreadPoolExecutor.CallerRunsPolicy();
+ break;
+ default:
+ handler = new ThreadPoolExecutor.AbortPolicy();
+ break;
+ }
+ // 创建线程池
+ return new ThreadPoolExecutor(properties.getCorePoolSize(),
+ properties.getMaxPoolSize(),
+ properties.getKeepAliveTime(),
+ TimeUnit.SECONDS,
+ new LinkedBlockingQueue<>(properties.getBlockQueueSize()),
+ Executors.defaultThreadFactory(),
+ handler);
+ }
+
+}
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/config/ThreadPoolConfigProperties.java b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/config/ThreadPoolConfigProperties.java
new file mode 100644
index 0000000..a61b5b3
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/config/ThreadPoolConfigProperties.java
@@ -0,0 +1,29 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+package ${package}.config;
+
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+@Data
+@ConfigurationProperties(prefix = "thread.pool.executor.config", ignoreInvalidFields = true)
+public class ThreadPoolConfigProperties {
+
+ /** 核心线程数 */
+ private Integer corePoolSize = 20;
+ /** 最大线程数 */
+ private Integer maxPoolSize = 200;
+ /** 最大等待时间 */
+ private Long keepAliveTime = 10L;
+ /** 最大队列数 */
+ private Integer blockQueueSize = 5000;
+ /*
+ * AbortPolicy:丢弃任务并抛出RejectedExecutionException异常。
+ * DiscardPolicy:直接丢弃任务,但是不会抛出异常
+ * DiscardOldestPolicy:将最早进入队列的任务删除,之后再尝试加入队列的任务被拒绝
+ * CallerRunsPolicy:如果任务添加线程池失败,那么主线程自己执行该任务
+ * */
+ private String policy = "AbortPolicy";
+
+}
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/config/package-info.java b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/config/package-info.java
new file mode 100644
index 0000000..a220ee7
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/config/package-info.java
@@ -0,0 +1,9 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * 1. 用于管理引入的Jar所需的资源启动或者初始化处理
+ * 2. 如果有AOP切面,可以再建一个aop包,来写切面逻辑
+ */
+package ${package}.config;
+
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/package-info.java b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/package-info.java
new file mode 100644
index 0000000..fb96c75
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/package-info.java
@@ -0,0 +1,7 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * 应用启动层,注意Application所在的包路径,是在上一层。这样才能扫描到其他 module
+ * */
+package ${package};
\ No newline at end of file
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/application-dev.yml b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/application-dev.yml
new file mode 100644
index 0000000..a11ff2b
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/application-dev.yml
@@ -0,0 +1,45 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+server:
+ port: 8091
+
+${symbol_pound} 线程池配置
+thread:
+ pool:
+ executor:
+ config:
+ core-pool-size: 20
+ max-pool-size: 50
+ keep-alive-time: 5000
+ block-queue-size: 5000
+ policy: CallerRunsPolicy
+
+${symbol_pound} 数据库配置;启动时配置数据库资源信息
+spring:
+ datasource:
+ username: root
+ password: 123456
+ url: jdbc:mysql://127.0.0.1:3306/xfg_frame_archetype?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&serverTimezone=UTC&useSSL=true
+ driver-class-name: com.mysql.cj.jdbc.Driver
+ type: com.zaxxer.hikari.HikariDataSource
+ hikari:
+ pool-name: Retail_HikariCP
+ minimum-idle: 15 ${symbol_pound}最小空闲连接数量
+ idle-timeout: 180000 ${symbol_pound}空闲连接存活最大时间,默认600000(10分钟)
+ maximum-pool-size: 25 ${symbol_pound}连接池最大连接数,默认是10
+ auto-commit: true ${symbol_pound}此属性控制从池返回的连接的默认自动提交行为,默认值:true
+ max-lifetime: 1800000 ${symbol_pound}此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认1800000即30分钟
+ connection-timeout: 30000 ${symbol_pound}数据库连接超时时间,默认30秒,即30000
+ connection-test-query: SELECT 1
+
+# MyBatis 配置【如需使用记得打开】
+#mybatis:
+# mapper-locations: classpath:/mybatis/mapper/*.xml
+# config-location: classpath:/mybatis/config/mybatis-config.xml
+
+${symbol_pound} 日志
+logging:
+ level:
+ root: info
+ config: classpath:logback-spring.xml
\ No newline at end of file
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/application-prod.yml b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/application-prod.yml
new file mode 100644
index 0000000..d27dd84
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/application-prod.yml
@@ -0,0 +1,44 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+server:
+ port: 8091
+
+${symbol_pound} 线程池配置
+thread:
+ pool:
+ executor:
+ config:
+ core-pool-size: 20
+ max-pool-size: 50
+ keep-alive-time: 5000
+ block-queue-size: 5000
+ policy: CallerRunsPolicy
+
+${symbol_pound} 数据库配置
+#spring:
+# datasource:
+# username: root
+# password: 123456
+# url: jdbc:mysql://127.0.0.1:3306/xfg_frame_archetype?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&serverTimezone=UTC&useSSL=true
+# driver-class-name: com.mysql.cj.jdbc.Driver
+# hikari:
+# pool-name: Retail_HikariCP
+# minimum-idle: 15 ${symbol_pound}最小空闲连接数量
+# idle-timeout: 180000 ${symbol_pound}空闲连接存活最大时间,默认600000(10分钟)
+# maximum-pool-size: 25 ${symbol_pound}连接池最大连接数,默认是10
+# auto-commit: true ${symbol_pound}此属性控制从池返回的连接的默认自动提交行为,默认值:true
+# max-lifetime: 1800000 ${symbol_pound}此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认1800000即30分钟
+# connection-timeout: 30000 ${symbol_pound}数据库连接超时时间,默认30秒,即30000
+# connection-test-query: SELECT 1
+# type: com.zaxxer.hikari.HikariDataSource
+
+#mybatis:
+# mapper-locations: classpath:/mybatis/mapper/*.xml
+# config-location: classpath:/mybatis/config/mybatis-config.xml
+
+${symbol_pound} 日志
+logging:
+ level:
+ root: info
+ config: classpath:logback-spring.xml
\ No newline at end of file
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/application-test.yml b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/application-test.yml
new file mode 100644
index 0000000..d27dd84
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/application-test.yml
@@ -0,0 +1,44 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+server:
+ port: 8091
+
+${symbol_pound} 线程池配置
+thread:
+ pool:
+ executor:
+ config:
+ core-pool-size: 20
+ max-pool-size: 50
+ keep-alive-time: 5000
+ block-queue-size: 5000
+ policy: CallerRunsPolicy
+
+${symbol_pound} 数据库配置
+#spring:
+# datasource:
+# username: root
+# password: 123456
+# url: jdbc:mysql://127.0.0.1:3306/xfg_frame_archetype?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&serverTimezone=UTC&useSSL=true
+# driver-class-name: com.mysql.cj.jdbc.Driver
+# hikari:
+# pool-name: Retail_HikariCP
+# minimum-idle: 15 ${symbol_pound}最小空闲连接数量
+# idle-timeout: 180000 ${symbol_pound}空闲连接存活最大时间,默认600000(10分钟)
+# maximum-pool-size: 25 ${symbol_pound}连接池最大连接数,默认是10
+# auto-commit: true ${symbol_pound}此属性控制从池返回的连接的默认自动提交行为,默认值:true
+# max-lifetime: 1800000 ${symbol_pound}此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认1800000即30分钟
+# connection-timeout: 30000 ${symbol_pound}数据库连接超时时间,默认30秒,即30000
+# connection-test-query: SELECT 1
+# type: com.zaxxer.hikari.HikariDataSource
+
+#mybatis:
+# mapper-locations: classpath:/mybatis/mapper/*.xml
+# config-location: classpath:/mybatis/config/mybatis-config.xml
+
+${symbol_pound} 日志
+logging:
+ level:
+ root: info
+ config: classpath:logback-spring.xml
\ No newline at end of file
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/application.yml b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/application.yml
new file mode 100644
index 0000000..4570423
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/application.yml
@@ -0,0 +1,8 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+spring:
+ config:
+ name: ${artifactId}
+ profiles:
+ active: dev
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/logback-spring.xml b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/logback-spring.xml
new file mode 100644
index 0000000..2712e06
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/logback-spring.xml
@@ -0,0 +1,116 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+
+
+
+
+ logback
+
+
+
+
+
+
+
+
+
+
+
+ info
+
+
+ %d{yy-MM-dd.HH:mm:ss.SSS} [%-16t] %-5p %-22c{0}%X{ServiceId} -%X{trace-id} %m%n
+ UTF-8
+
+
+
+
+
+
+
+ ./data/log/log_info.log
+
+
+ %d{yy-MM-dd.HH:mm:ss.SSS} [%-16t] %-5p %-22c{0}%X{ServiceId} -%X{trace-id} %m%n
+ UTF-8
+
+
+
+
+ ./data/log/log-info-%d{yyyy-MM-dd}.%i.log
+
+ 100MB
+
+
+ 15
+ 10GB
+
+
+
+
+
+
+ ./data/log/log_error.log
+
+
+ %d{yy-MM-dd.HH:mm:ss.SSS} [%-16t] %-5p %-22c{0}%X{ServiceId} -%X{trace-id} %m%n
+ UTF-8
+
+
+
+ ./data/log/log-error-%d{yyyy-MM-dd}.%i.log
+
+ 100MB
+
+
+ 7
+ 5GB
+
+
+
+ WARN
+
+
+
+
+
+
+ 0
+
+ 8192
+
+ true
+
+ false
+
+
+
+
+
+ 0
+
+ 1024
+
+ true
+
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/mybatis/config/mybatis-config.xml b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/mybatis/config/mybatis-config.xml
new file mode 100644
index 0000000..4b56929
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/mybatis/config/mybatis-config.xml
@@ -0,0 +1,12 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/mybatis/mapper/frame_case_mapper.xml b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/mybatis/mapper/frame_case_mapper.xml
new file mode 100644
index 0000000..5bc9c7c
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/mybatis/mapper/frame_case_mapper.xml
@@ -0,0 +1,28 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+
+
+
+
+
+
+
+
+
+
+
+ INSERT INTO table(a,b,c) VALUES(${symbol_pound}{a}, ${symbol_pound}{b}, ${symbol_pound}{c})
+
+
+
+ UPDATE table SET a = ${symbol_pound}{a} WHERE b = ${symbol_pound}{b}
+
+
+
+
+
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/test/java/test/ApiTest.java b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/test/java/test/ApiTest.java
new file mode 100644
index 0000000..8375bba
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-app/src/test/java/test/ApiTest.java
@@ -0,0 +1,22 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+package ${package}.test;
+
+import lombok.extern.slf4j.Slf4j;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+@Slf4j
+@RunWith(SpringRunner.class)
+@SpringBootTest
+public class ApiTest {
+
+ @Test
+ public void test() {
+ log.info("测试完成");
+ }
+
+}
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-case/pom.xml b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-case/pom.xml
new file mode 100644
index 0000000..4e83f18
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-case/pom.xml
@@ -0,0 +1,32 @@
+
+
+ 4.0.0
+
+ ${groupId}
+ ${rootArtifactId}
+ ${version}
+
+
+ ${artifactId}
+
+
+
+ ${groupId}
+ ${rootArtifactId}-domain
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+ ${java.version}
+ ${java.version}
+
+
+
+
+
+
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-case/src/main/java/cases/IXxxCaseService.java b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-case/src/main/java/cases/IXxxCaseService.java
new file mode 100644
index 0000000..c4e8c6e
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-case/src/main/java/cases/IXxxCaseService.java
@@ -0,0 +1,10 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+package ${package}.cases;
+
+import java.io.Serializable;
+
+public interface IXxxCaseService {
+
+}
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-case/src/main/java/cases/IYyyCaseService.java b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-case/src/main/java/cases/IYyyCaseService.java
new file mode 100644
index 0000000..31d4c65
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-case/src/main/java/cases/IYyyCaseService.java
@@ -0,0 +1,10 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+package ${package}.cases;
+
+import java.io.Serializable;
+
+public interface IYyyCaseService {
+
+}
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-case/src/main/java/cases/package-info.java b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-case/src/main/java/cases/package-info.java
new file mode 100644
index 0000000..632961d
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-case/src/main/java/cases/package-info.java
@@ -0,0 +1,7 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * 分摊 trigger 层压力,编排 domain 领域功能
+ */
+package ${package}.api;
\ No newline at end of file
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-case/src/main/java/cases/xxx/XxxCaseService.java b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-case/src/main/java/cases/xxx/XxxCaseService.java
new file mode 100644
index 0000000..024307b
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-case/src/main/java/cases/xxx/XxxCaseService.java
@@ -0,0 +1,13 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+package ${package}.cases;
+
+import ${package}.cases.IXxxCaseService;
+import java.io.Serializable;
+import org.springframework.stereotype.Service;
+
+@Service
+public interface IXxxCaseService implements IXxxCaseService {
+
+}
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-case/src/main/java/cases/xxx/package-info.java b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-case/src/main/java/cases/xxx/package-info.java
new file mode 100644
index 0000000..1d1bc9c
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-case/src/main/java/cases/xxx/package-info.java
@@ -0,0 +1,7 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * 编排
+ */
+package ${package}.cases.xxx;
\ No newline at end of file
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-case/src/main/java/cases/yyy/YyyCaseService.java b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-case/src/main/java/cases/yyy/YyyCaseService.java
new file mode 100644
index 0000000..f9b5c45
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-case/src/main/java/cases/yyy/YyyCaseService.java
@@ -0,0 +1,14 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+package ${package}.cases;
+
+import ${package}.cases.IYyyCaseService;
+
+import java.io.Serializable;
+import org.springframework.stereotype.Service;
+
+@Service
+public interface IYyyCaseService implements IYyyCaseService {
+
+}
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-case/src/main/java/cases/yyy/package-info.java b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-case/src/main/java/cases/yyy/package-info.java
new file mode 100644
index 0000000..1d1bc9c
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-case/src/main/java/cases/yyy/package-info.java
@@ -0,0 +1,7 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * 编排
+ */
+package ${package}.cases.xxx;
\ No newline at end of file
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/pom.xml b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/pom.xml
new file mode 100644
index 0000000..a2dab4e
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/pom.xml
@@ -0,0 +1,63 @@
+
+
+ 4.0.0
+
+ ${groupId}
+ ${rootArtifactId}
+ ${version}
+
+
+ ${artifactId}
+
+
+
+ org.projectlombok
+ lombok
+
+
+ com.alibaba
+ fastjson
+
+
+ org.apache.commons
+ commons-lang3
+
+
+ com.google.guava
+ guava
+
+
+ io.jsonwebtoken
+ jjwt
+
+
+ com.auth0
+ java-jwt
+
+
+ commons-codec
+ commons-codec
+
+
+
+ ${groupId}
+ ${rootArtifactId}-types
+
+
+
+
+ ${rootArtifactId}-domain
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+ ${java.version}
+ ${java.version}
+ ${java.version}
+
+
+
+
+
+
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/xxx/adapter/package-info.java b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/xxx/adapter/package-info.java
new file mode 100644
index 0000000..fcd970d
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/xxx/adapter/package-info.java
@@ -0,0 +1,7 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * 外部接口适配器层;当需要调用外部接口时,则创建出这一层,并定义接口,之后由基础设施层的 adapter 层具体实现
+ */
+package ${package}.domain.xxx.adapter;
\ No newline at end of file
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/xxx/adapter/port/package-info.java b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/xxx/adapter/port/package-info.java
new file mode 100644
index 0000000..b3a3bcf
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/xxx/adapter/port/package-info.java
@@ -0,0 +1,7 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * 外部接口适配器层;当需要调用外部接口时,则创建出这一层,并定义接口,之后由基础设施层的 adapter 层具体实现
+ */
+package ${package}.domain.xxx.adapter.port;
\ No newline at end of file
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/xxx/adapter/repository/package-info.java b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/xxx/adapter/repository/package-info.java
new file mode 100644
index 0000000..efc4bb7
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/xxx/adapter/repository/package-info.java
@@ -0,0 +1,8 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * 仓储服务
+ * 1. 定义仓储接口,之后由基础设施层做具体实现
+ */
+package ${package}.domain.xxx.adapter.repository;
\ No newline at end of file
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/xxx/model/aggregate/package-info.java b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/xxx/model/aggregate/package-info.java
new file mode 100644
index 0000000..da61b0a
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/xxx/model/aggregate/package-info.java
@@ -0,0 +1,10 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * 聚合对象;
+ * 1. 聚合实体和值对象
+ * 2. 聚合是聚合的对象,和提供基础处理对象的方法。但不建议在聚合中引入仓储和接口来做过大的逻辑。而这些复杂的操作应该放到service中处理
+ * 3. 对象名称 XxxAggregate
+ */
+package ${package}.domain.xxx.model.aggregate;
\ No newline at end of file
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/xxx/model/entity/package-info.java b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/xxx/model/entity/package-info.java
new file mode 100644
index 0000000..fdf42b1
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/xxx/model/entity/package-info.java
@@ -0,0 +1,10 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * 实体对象;
+ * 1. 一般和数据库持久化对象1v1的关系,但因各自开发系统的不同,也有1vn的可能。
+ * 2. 如果是老系统改造,那么旧的库表冗余了太多的字段,可能会有nv1的情况
+ * 3. 对象名称 XxxEntity
+ */
+package ${package}.domain.xxx.model.entity;
\ No newline at end of file
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/xxx/model/valobj/package-info.java b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/xxx/model/valobj/package-info.java
new file mode 100644
index 0000000..274f460
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/xxx/model/valobj/package-info.java
@@ -0,0 +1,9 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * 值对象;
+ * 1. 用于描述对象属性的值,如一个库表中有json后者一个字段多个属性信息的枚举对象
+ * 2. 对象名称如;XxxVO
+ */
+package ${package}.domain.xxx.model.valobj;
\ No newline at end of file
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/xxx/service/package-info.java b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/xxx/service/package-info.java
new file mode 100644
index 0000000..eff50b9
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/xxx/service/package-info.java
@@ -0,0 +1,4 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+package ${package}.domain.xxx.service;
\ No newline at end of file
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/yyy/adapter/repository/package-info.java b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/yyy/adapter/repository/package-info.java
new file mode 100644
index 0000000..e69de29
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/yyy/model/aggregate/package-info.java b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/yyy/model/aggregate/package-info.java
new file mode 100644
index 0000000..43b7c4d
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/yyy/model/aggregate/package-info.java
@@ -0,0 +1,10 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * 聚合对象;
+ * 1. 聚合实体和值对象
+ * 2. 聚合是聚合的对象,和提供基础处理对象的方法。但不建议在聚合中引入仓储和接口来做过大的逻辑。而这些复杂的操作应该放到service中处理
+ * 3. 对象名称 XxxAggregate
+ */
+package ${package}.domain.yyy.model.aggregate;
\ No newline at end of file
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/yyy/model/entity/package-info.java b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/yyy/model/entity/package-info.java
new file mode 100644
index 0000000..f24402f
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/yyy/model/entity/package-info.java
@@ -0,0 +1,10 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * 实体对象;
+ * 1. 一般和数据库持久化对象1v1的关系,但因各自开发系统的不同,也有1vn的可能。
+ * 2. 如果是老系统改造,那么旧的库表冗余了太多的字段,可能会有nv1的情况
+ * 3. 对象名称 XxxEntity
+ */
+package ${package}.domain.yyy.model.entity;
\ No newline at end of file
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/yyy/model/valobj/package-info.java b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/yyy/model/valobj/package-info.java
new file mode 100644
index 0000000..f6dba7e
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/yyy/model/valobj/package-info.java
@@ -0,0 +1,9 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * 值对象;
+ * 1. 用于描述对象属性的值,如一个库表中有json后者一个字段多个属性信息的枚举对象
+ * 2. 对象名称如;XxxVO
+ */
+package ${package}.domain.yyy.model.valobj;
\ No newline at end of file
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/yyy/service/package-info.java b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/yyy/service/package-info.java
new file mode 100644
index 0000000..624a6e5
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/yyy/service/package-info.java
@@ -0,0 +1,4 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+package ${package}.domain.yyy.service;
\ No newline at end of file
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/pom.xml b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/pom.xml
new file mode 100644
index 0000000..cfec187
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/pom.xml
@@ -0,0 +1,34 @@
+
+
+ 4.0.0
+
+ ${groupId}
+ ${rootArtifactId}
+ ${version}
+
+
+ ${artifactId}
+
+
+
+ org.mybatis.spring.boot
+ mybatis-spring-boot-starter
+
+
+
+ org.projectlombok
+ lombok
+
+
+
+
+ ${groupId}
+ ${rootArtifactId}-domain
+
+
+
+
+ ${rootArtifactId}-infrastructure
+
+
+
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/adapter/port/package-info.java b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/adapter/port/package-info.java
new file mode 100644
index 0000000..1e1dc99
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/adapter/port/package-info.java
@@ -0,0 +1,7 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * 实现对外部的api调用,类的名称为 XxxPort 接口定义在 domain 中
+ */
+package ${package}.infrastructure.adapter.port;
\ No newline at end of file
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/adapter/repository/package-info.java b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/adapter/repository/package-info.java
new file mode 100644
index 0000000..7a26e90
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/adapter/repository/package-info.java
@@ -0,0 +1,7 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * 仓储实现;用于实现 domain 中定义的仓储接口,如;IXxxRepository 在 Repository 中调用服务
+ */
+package ${package}.infrastructure.adapter.repository;
\ No newline at end of file
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/dao/package-info.java b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/dao/package-info.java
new file mode 100644
index 0000000..49d9714
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/dao/package-info.java
@@ -0,0 +1,7 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * DAO 接口;IXxxDao
+ */
+package ${package}.infrastructure.dao;
\ No newline at end of file
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/dao/po/package-info.java b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/dao/po/package-info.java
new file mode 100644
index 0000000..361e73d
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/dao/po/package-info.java
@@ -0,0 +1,7 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * 持久化对象;XxxPO 最后的 PO 是大写,UserPO
+ */
+package ${package}.infrastructure.dao.po;
\ No newline at end of file
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/gateway/dto/package-info.java b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/gateway/dto/package-info.java
new file mode 100644
index 0000000..e69de29
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/gateway/package-info.java b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/gateway/package-info.java
new file mode 100644
index 0000000..6858286
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/gateway/package-info.java
@@ -0,0 +1,7 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * 定义http、rpc接口,调用外部。在 adapter 中调用这部分内容。
+ */
+package ${package}.infrastructure.gateway;
\ No newline at end of file
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/redis/package-info.java b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/redis/package-info.java
new file mode 100644
index 0000000..2c8ff3a
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/redis/package-info.java
@@ -0,0 +1,7 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * 提供redis链接配置
+ */
+package ${package}.infrastructure.redis;
\ No newline at end of file
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-trigger/pom.xml b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-trigger/pom.xml
new file mode 100644
index 0000000..ce6f020
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-trigger/pom.xml
@@ -0,0 +1,53 @@
+
+
+ 4.0.0
+
+ ${groupId}
+ ${rootArtifactId}
+ ${version}
+
+
+ ${artifactId}
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ com.alibaba
+ fastjson
+
+
+ org.springframework
+ spring-tx
+
+
+ org.apache.commons
+ commons-lang3
+
+
+
+
+ ${groupId}
+ ${rootArtifactId}-api
+
+
+ ${groupId}
+ ${rootArtifactId}-types
+
+
+ ${groupId}
+ ${rootArtifactId}-domain
+
+
+ ${groupId}
+ ${rootArtifactId}-case
+
+
+
+
+ ${rootArtifactId}-trigger
+
+
+
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-trigger/src/main/java/trigger/http/package-info.java b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-trigger/src/main/java/trigger/http/package-info.java
new file mode 100644
index 0000000..d1ce14a
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-trigger/src/main/java/trigger/http/package-info.java
@@ -0,0 +1,7 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * HTTP 接口服务
+ */
+package ${package}.trigger.http;
\ No newline at end of file
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-trigger/src/main/java/trigger/job/package-info.java b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-trigger/src/main/java/trigger/job/package-info.java
new file mode 100644
index 0000000..57d8ef9
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-trigger/src/main/java/trigger/job/package-info.java
@@ -0,0 +1,7 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * 任务服务,可以选择使用 Spring 默认提供的 Schedule https://bugstack.cn/md/road-map/quartz.html
+ */
+package ${package}.trigger.job;
\ No newline at end of file
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-trigger/src/main/java/trigger/listener/package-info.java b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-trigger/src/main/java/trigger/listener/package-info.java
new file mode 100644
index 0000000..e557039
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-trigger/src/main/java/trigger/listener/package-info.java
@@ -0,0 +1,8 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * 监听服务;在单体服务中,解耦流程。类似MQ的使用,如Spring的Event,Guava的事件总线都可以。如果使用了 Redis 那么也可以有发布/订阅使用。
+ * Guava:https://bugstack.cn/md/road-map/guava.html
+ */
+package ${package}.trigger.listener;
\ No newline at end of file
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-types/pom.xml b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-types/pom.xml
new file mode 100644
index 0000000..161bbca
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-types/pom.xml
@@ -0,0 +1,39 @@
+
+
+ 4.0.0
+
+ ${groupId}
+ ${rootArtifactId}
+ ${version}
+
+
+ ${artifactId}
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.projectlombok
+ lombok
+
+
+ com.thoughtworks.xstream
+ xstream
+
+
+ dom4j
+ dom4j
+
+
+ org.apache.commons
+ commons-lang3
+
+
+
+
+ ${rootArtifactId}-types
+
+
+
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-types/src/main/java/types/common/Constants.java b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-types/src/main/java/types/common/Constants.java
new file mode 100644
index 0000000..8e5d45e
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-types/src/main/java/types/common/Constants.java
@@ -0,0 +1,10 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+package ${package}.types.common;
+
+public class Constants {
+
+ public final static String SPLIT = ",";
+
+}
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-types/src/main/java/types/enums/ResponseCode.java b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-types/src/main/java/types/enums/ResponseCode.java
new file mode 100644
index 0000000..9b836de
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-types/src/main/java/types/enums/ResponseCode.java
@@ -0,0 +1,23 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+package ${package}.types.enums;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+
+@AllArgsConstructor
+@NoArgsConstructor
+@Getter
+public enum ResponseCode {
+
+ SUCCESS("0000", "成功"),
+ UN_ERROR("0001", "未知失败"),
+ ILLEGAL_PARAMETER("0002", "非法参数"),
+ ;
+
+ private String code;
+ private String info;
+
+}
diff --git a/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-types/src/main/java/types/exception/AppException.java b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-types/src/main/java/types/exception/AppException.java
new file mode 100644
index 0000000..e202cae
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/__rootArtifactId__-types/src/main/java/types/exception/AppException.java
@@ -0,0 +1,49 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+package ${package}.types.exception;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+@EqualsAndHashCode(callSuper = true)
+@Data
+public class AppException extends RuntimeException {
+
+ private static final long serialVersionUID = 5317680961212299217L;
+
+ /** 异常码 */
+ private String code;
+
+ /** 异常信息 */
+ private String info;
+
+ public AppException(String code) {
+ this.code = code;
+ }
+
+ public AppException(String code, Throwable cause) {
+ this.code = code;
+ super.initCause(cause);
+ }
+
+ public AppException(String code, String message) {
+ this.code = code;
+ this.info = message;
+ }
+
+ public AppException(String code, String message, Throwable cause) {
+ this.code = code;
+ this.info = message;
+ super.initCause(cause);
+ }
+
+ @Override
+ public String toString() {
+ return "${package}.x.api.types.exception.XApiException{" +
+ "code='" + code + '${symbol_escape}'' +
+ ", info='" + info + '${symbol_escape}'' +
+ '}';
+ }
+
+}
diff --git a/scaffold-std/src/main/resources/archetype-resources/docs/dev-ops/app/start.sh b/scaffold-std/src/main/resources/archetype-resources/docs/dev-ops/app/start.sh
new file mode 100644
index 0000000..84b1c36
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/docs/dev-ops/app/start.sh
@@ -0,0 +1,20 @@
+CONTAINER_NAME=${artifactId}
+IMAGE_NAME=system/${artifactId}:${version}
+PORT=8091
+
+echo "容器部署开始 ${CONTAINER_NAME}"
+
+# 停止容器
+docker stop ${CONTAINER_NAME}
+
+# 删除容器
+docker rm ${CONTAINER_NAME}
+
+# 启动容器
+docker run --name ${CONTAINER_NAME} \
+-p ${PORT}:${PORT} \
+-d ${IMAGE_NAME}
+
+echo "容器部署成功 ${CONTAINER_NAME}"
+
+docker logs -f ${CONTAINER_NAME}
\ No newline at end of file
diff --git a/scaffold-std/src/main/resources/archetype-resources/docs/dev-ops/app/stop.sh b/scaffold-std/src/main/resources/archetype-resources/docs/dev-ops/app/stop.sh
new file mode 100644
index 0000000..c50d125
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/docs/dev-ops/app/stop.sh
@@ -0,0 +1 @@
+docker stop ${artifactId}
\ No newline at end of file
diff --git a/scaffold-std/src/main/resources/archetype-resources/docs/dev-ops/docker-compose-app.yml b/scaffold-std/src/main/resources/archetype-resources/docs/dev-ops/docker-compose-app.yml
new file mode 100644
index 0000000..7f97487
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/docs/dev-ops/docker-compose-app.yml
@@ -0,0 +1,27 @@
+# /usr/local/bin/docker-compose -f /docs/dev-ops/environment/environment-docker-compose-2.4.yml up -d
+version: '3.8'
+# docker-compose -f docker-compose-app.yml up -d
+# 你需要修改system为你自身系统的仓库名
+services:
+ ${artifactId}:
+ image: system/${artifactId}:${version}
+ container_name: ${artifactId}
+ restart: on-failure
+ ports:
+ - "8091:8091"
+ environment:
+ - TZ=PRC
+ - SERVER_PORT=8091
+ volumes:
+ - ./log:/data/log
+ logging:
+ driver: "json-file"
+ options:
+ max-size: "10m"
+ max-file: "3"
+ networks:
+ - my-network
+
+networks:
+ my-network:
+ driver: bridge
diff --git a/scaffold-std/src/main/resources/archetype-resources/docs/dev-ops/docker-compose-environment-aliyun.yml b/scaffold-std/src/main/resources/archetype-resources/docs/dev-ops/docker-compose-environment-aliyun.yml
new file mode 100644
index 0000000..60ef9c0
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/docs/dev-ops/docker-compose-environment-aliyun.yml
@@ -0,0 +1,88 @@
+# 命令执行 docker-compose -f docker-compose-environment-aliyun.yml up -d
+# docker 代理和使用文档;https://bugstack.cn/md/road-map/docker.html
+version: '3.9'
+services:
+ mysql:
+ image: registry.cn-hangzhou.aliyuncs.com/xfg-studio/mysql:8.0.32
+ container_name: mysql
+ command: --default-authentication-plugin=mysql_native_password
+ restart: always
+ environment:
+ TZ: Asia/Shanghai
+ MYSQL_ROOT_PASSWORD: 123456
+ ports:
+ - "13306:3306"
+ volumes:
+ - ./mysql/my.cnf:/etc/mysql/conf.d/mysql.cnf:ro
+ - ./mysql/sql:/docker-entrypoint-initdb.d
+ healthcheck:
+ test: [ "CMD", "mysqladmin" ,"ping", "-h", "localhost" ]
+ interval: 5s
+ timeout: 10s
+ retries: 10
+ start_period: 15s
+ networks:
+ - my-network
+
+ # phpmyadmin https://hub.docker.com/_/phpmyadmin
+ phpmyadmin:
+ image: registry.cn-hangzhou.aliyuncs.com/xfg-studio/phpmyadmin:5.2.1
+ container_name: phpmyadmin
+ hostname: phpmyadmin
+ ports:
+ - 8899:80
+ environment:
+ - PMA_HOST=mysql
+ - PMA_PORT=3306
+ - MYSQL_ROOT_PASSWORD=123qwe!@#QWE
+ depends_on:
+ mysql:
+ condition: service_healthy
+ networks:
+ - my-network
+
+ # Redis
+ redis:
+ image: registry.cn-hangzhou.aliyuncs.com/xfg-studio/redis:6.2
+ container_name: redis
+ restart: always
+ hostname: redis
+ privileged: true
+ ports:
+ - 16379:6379
+ volumes:
+ - ./redis/redis.conf:/usr/local/etc/redis/redis.conf
+ command: redis-server /usr/local/etc/redis/redis.conf
+ networks:
+ - my-network
+ healthcheck:
+ test: [ "CMD", "redis-cli", "ping" ]
+ interval: 10s
+ timeout: 5s
+ retries: 3
+
+ # RedisAdmin https://github.com/joeferner/redis-commander
+ # 账密 admin/admin
+ redis-admin:
+ image: registry.cn-hangzhou.aliyuncs.com/xfg-studio/redis-commander:0.8.0
+ container_name: redis-admin
+ hostname: redis-commander
+ restart: always
+ ports:
+ - 8081:8081
+ environment:
+ - REDIS_HOSTS=local:redis:6379
+ - HTTP_USER=admin
+ - HTTP_PASSWORD=admin
+ - LANG=C.UTF-8
+ - LANGUAGE=C.UTF-8
+ - LC_ALL=C.UTF-8
+ networks:
+ - my-network
+ depends_on:
+ redis:
+ condition: service_healthy
+
+networks:
+ my-network:
+ driver: bridge
\ No newline at end of file
diff --git a/scaffold-std/src/main/resources/archetype-resources/docs/dev-ops/docker-compose-environment.yml b/scaffold-std/src/main/resources/archetype-resources/docs/dev-ops/docker-compose-environment.yml
new file mode 100644
index 0000000..4d1cae6
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/docs/dev-ops/docker-compose-environment.yml
@@ -0,0 +1,87 @@
+# 命令执行 docker-compose -f docker-compose-environment-aliyun.yml up -d
+# docker 代理和使用文档;https://bugstack.cn/md/road-map/docker.html
+version: '3.9'
+services:
+ mysql:
+ image: mysql:8.0.32
+ container_name: mysql
+ command: --default-authentication-plugin=mysql_native_password
+ restart: always
+ environment:
+ TZ: Asia/Shanghai
+ MYSQL_ROOT_PASSWORD: 123456
+ ports:
+ - "13306:3306"
+ volumes:
+ - ./mysql/my.cnf:/etc/mysql/conf.d/mysql.cnf:ro
+ - ./mysql/sql:/docker-entrypoint-initdb.d
+ healthcheck:
+ test: [ "CMD", "mysqladmin" ,"ping", "-h", "localhost" ]
+ interval: 5s
+ timeout: 10s
+ retries: 10
+ start_period: 15s
+ networks:
+ - my-network
+
+ # phpmyadmin https://hub.docker.com/_/phpmyadmin
+ phpmyadmin:
+ image: phpmyadmin:5.2.1
+ container_name: phpmyadmin
+ hostname: phpmyadmin
+ ports:
+ - 8899:80
+ environment:
+ - PMA_HOST=mysql
+ - PMA_PORT=3306
+ - MYSQL_ROOT_PASSWORD=123456
+ depends_on:
+ mysql:
+ condition: service_healthy
+ networks:
+ - my-network
+
+ # Redis
+ redis:
+ image: redis:6.2
+ container_name: redis
+ restart: always
+ hostname: redis
+ privileged: true
+ ports:
+ - 16379:6379
+ volumes:
+ - ./redis/redis.conf:/usr/local/etc/redis/redis.conf
+ command: redis-server /usr/local/etc/redis/redis.conf
+ networks:
+ - my-network
+ healthcheck:
+ test: [ "CMD", "redis-cli", "ping" ]
+ interval: 10s
+ timeout: 5s
+ retries: 3
+
+ # RedisAdmin https://github.com/joeferner/redis-commander
+ redis-admin:
+ image: spryker/redis-commander:0.8.0
+ container_name: redis-admin
+ hostname: redis-commander
+ restart: always
+ ports:
+ - 8081:8081
+ environment:
+ - REDIS_HOSTS=local:redis:6379
+ - HTTP_USER=admin
+ - HTTP_PASSWORD=admin
+ - LANG=C.UTF-8
+ - LANGUAGE=C.UTF-8
+ - LC_ALL=C.UTF-8
+ networks:
+ - my-network
+ depends_on:
+ redis:
+ condition: service_healthy
+
+networks:
+ my-network:
+ driver: bridge
\ No newline at end of file
diff --git a/scaffold-std/src/main/resources/archetype-resources/docs/dev-ops/mysql/my.cnf b/scaffold-std/src/main/resources/archetype-resources/docs/dev-ops/mysql/my.cnf
new file mode 100644
index 0000000..0768a14
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/docs/dev-ops/mysql/my.cnf
@@ -0,0 +1,24 @@
+[client]
+port = 3306
+default-character-set = utf8mb4
+
+[mysqld]
+user = mysql
+port = 3306
+sql_mode = NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
+
+default-storage-engine = InnoDB
+default-authentication-plugin = mysql_native_password
+character-set-server = utf8mb4
+collation-server = utf8mb4_unicode_ci
+init_connect = 'SET NAMES utf8mb4'
+
+slow_query_log
+#long_query_time = 3
+slow-query-log-file = /var/log/mysql/mysql.slow.log
+log-error = /var/log/mysql/mysql.error.log
+
+default-time-zone = '+8:00'
+
+[mysql]
+default-character-set = utf8mb4
\ No newline at end of file
diff --git a/scaffold-std/src/main/resources/archetype-resources/docs/dev-ops/mysql/sql/xfg-frame-archetype.sql b/scaffold-std/src/main/resources/archetype-resources/docs/dev-ops/mysql/sql/xfg-frame-archetype.sql
new file mode 100644
index 0000000..8b598d3
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/docs/dev-ops/mysql/sql/xfg-frame-archetype.sql
@@ -0,0 +1,108 @@
+/*
+ Navicat Premium Data Transfer
+
+ Source Server : 127.0.0.1
+ Source Server Type : MySQL
+ Source Server Version : 50639
+ Source Host : localhost:3306
+ Source Schema : road-map
+
+ Target Server Type : MySQL
+ Target Server Version : 50639
+ File Encoding : 65001
+
+ Date: 15/07/2023 09:26:39
+*/
+
+SET NAMES utf8mb4;
+SET FOREIGN_KEY_CHECKS = 0;
+
+CREATE database if NOT EXISTS `xfg_frame_archetype` default character set utf8mb4 collate utf8mb4_0900_ai_ci;
+use `xfg_frame_archetype`;
+
+-- ----------------------------
+-- Table structure for employee
+-- ----------------------------
+DROP TABLE IF EXISTS `employee`;
+CREATE TABLE `employee` (
+ `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
+ `employee_number` varchar(16) NOT NULL DEFAULT '' COMMENT '雇员ID',
+ `employee_name` varchar(32) NOT NULL DEFAULT '' COMMENT '雇员姓名',
+ `employee_level` varchar(8) NOT NULL DEFAULT '' COMMENT '雇员级别',
+ `employee_title` varchar(16) NOT NULL DEFAULT '' COMMENT '雇员岗位Title',
+ `create_time` datetime NOT NULL COMMENT '创建时间',
+ `update_time` datetime NOT NULL COMMENT '更新时间',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `idx_employee_number` (`employee_number`)
+) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of employee
+-- ----------------------------
+BEGIN;
+INSERT INTO `employee` VALUES (1, '10000001', 'sXvfDpsWnJdLsCVk64tJgw==', 'T-3', '中级工程师', '2023-07-14 15:26:26', '2023-07-14 15:26:26');
+INSERT INTO `employee` VALUES (2, '10000010', 'sXvfDpsWnJdLsCVk64tJgw==', 'T2', '见习工程师', '2023-07-14 15:34:40', '2023-07-14 15:34:40');
+INSERT INTO `employee` VALUES (3, '10000011', 'sXvfDpsWnJdLsCVk64tJgw==', 'T2', '见习工程师', '2023-07-14 15:34:40', '2023-07-14 15:34:40');
+INSERT INTO `employee` VALUES (4, '10000012', 'sXvfDpsWnJdLsCVk64tJgw==', 'T2', '见习工程师', '2023-07-14 15:34:40', '2023-07-14 15:34:40');
+INSERT INTO `employee` VALUES (5, '10000013', 'sXvfDpsWnJdLsCVk64tJgw==', 'T2', '见习工程师', '2023-07-14 15:34:40', '2023-07-14 15:34:40');
+INSERT INTO `employee` VALUES (6, '10000014', 'sXvfDpsWnJdLsCVk64tJgw==', 'T2', '见习工程师', '2023-07-14 15:34:40', '2023-07-14 15:34:40');
+INSERT INTO `employee` VALUES (9, '10000002', 'sXvfDpsWnJdLsCVk64tJgw==', 'T2', '见习工程师', '2023-07-15 07:42:52', '2023-07-15 07:42:52');
+INSERT INTO `employee` VALUES (22, '10000015', 'hMCgLG6WV3CsNBQ1UD6PEQ==', 'T2', '见习工程师', '2023-07-15 08:02:31', '2023-07-15 08:02:31');
+INSERT INTO `employee` VALUES (23, '10000016', 'hMCgLG6WV3CsNBQ1UD6PEQ==', 'T2', '见习工程师', '2023-07-15 08:02:31', '2023-07-15 08:02:31');
+INSERT INTO `employee` VALUES (24, '10000017', 'hMCgLG6WV3CsNBQ1UD6PEQ==', 'T2', '见习工程师', '2023-07-15 08:02:31', '2023-07-15 08:02:31');
+INSERT INTO `employee` VALUES (39, '10000022', 'GyG+V0r6mBCNsdusuKl03g==', 'T1', '实习工程师', '2023-07-15 09:17:49', '2023-07-15 09:17:49');
+COMMIT;
+
+-- ----------------------------
+-- Table structure for employee_salary
+-- ----------------------------
+DROP TABLE IF EXISTS `employee_salary`;
+CREATE TABLE `employee_salary` (
+ `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
+ `employee_number` varchar(16) NOT NULL DEFAULT '' COMMENT '雇员编号',
+ `salary_total_amount` decimal(8,2) NOT NULL COMMENT '薪资总额',
+ `salary_merit_amount` decimal(8,2) NOT NULL COMMENT '绩效工资',
+ `salary_base_amount` decimal(8,2) NOT NULL COMMENT '基础工资',
+ `create_time` datetime NOT NULL COMMENT '创建时间',
+ `update_time` datetime DEFAULT NULL COMMENT '更新时间',
+ PRIMARY KEY (`id`),
+ KEY `idx_employee_number` (`employee_number`)
+) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of employee_salary
+-- ----------------------------
+BEGIN;
+INSERT INTO `employee_salary` VALUES (1, '10000001', 5100.00, 1020.00, 4080.00, '2023-07-14 16:09:06', '2023-07-14 16:09:06');
+INSERT INTO `employee_salary` VALUES (2, '10000010', 5000.00, 1000.00, 4000.00, '2023-07-14 16:17:10', '2023-07-14 16:17:10');
+INSERT INTO `employee_salary` VALUES (3, '10000011', 5000.00, 1000.00, 4000.00, '2023-07-14 16:17:10', '2023-07-14 16:17:10');
+INSERT INTO `employee_salary` VALUES (4, '10000012', 5000.00, 1000.00, 4000.00, '2023-07-14 16:17:10', '2023-07-14 16:17:10');
+INSERT INTO `employee_salary` VALUES (5, '10000013', 5000.00, 1000.00, 4000.00, '2023-07-14 16:17:10', '2023-07-14 16:17:10');
+INSERT INTO `employee_salary` VALUES (6, '10000014', 5000.00, 1000.00, 4000.00, '2023-07-14 16:17:10', '2023-07-14 16:17:10');
+INSERT INTO `employee_salary` VALUES (8, '10000022', 100.00, 10.00, 90.00, '2023-07-15 09:17:49', '2023-07-15 09:17:49');
+COMMIT;
+
+-- ----------------------------
+-- Table structure for employee_salary_adjust
+-- ----------------------------
+DROP TABLE IF EXISTS `employee_salary_adjust`;
+CREATE TABLE `employee_salary_adjust` (
+ `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
+ `employee_number` varchar(16) NOT NULL DEFAULT '' COMMENT '雇员编号',
+ `adjust_order_id` varchar(32) NOT NULL DEFAULT '' COMMENT '调薪单号',
+ `adjust_total_amount` decimal(8,2) NOT NULL COMMENT '总额调薪',
+ `adjust_base_amount` decimal(8,2) NOT NULL COMMENT '基础调薪',
+ `adjust_merit_amount` decimal(8,2) NOT NULL COMMENT '绩效调薪',
+ `create_time` datetime NOT NULL COMMENT '创建时间',
+ `update_time` datetime NOT NULL COMMENT '更新时间',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `idx_order_id` (`adjust_order_id`)
+) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of employee_salary_adjust
+-- ----------------------------
+BEGIN;
+INSERT INTO `employee_salary_adjust` VALUES (1, '10000001', '109089990198888811', 1000.00, 800.00, 200.00, '2023-07-14 16:55:53', '2023-07-14 16:55:53');
+INSERT INTO `employee_salary_adjust` VALUES (2, '10000001', '100908977676001', 100.00, 20.00, 80.00, '2023-07-14 21:57:39', '2023-07-14 21:57:39');
+COMMIT;
\ No newline at end of file
diff --git a/scaffold-std/src/main/resources/archetype-resources/docs/dev-ops/redis/redis.conf b/scaffold-std/src/main/resources/archetype-resources/docs/dev-ops/redis/redis.conf
new file mode 100644
index 0000000..f6f3781
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/docs/dev-ops/redis/redis.conf
@@ -0,0 +1,2 @@
+bind 0.0.0.0
+port 6379
\ No newline at end of file
diff --git a/scaffold-std/src/main/resources/archetype-resources/pom.xml b/scaffold-std/src/main/resources/archetype-resources/pom.xml
new file mode 100644
index 0000000..02bcbce
--- /dev/null
+++ b/scaffold-std/src/main/resources/archetype-resources/pom.xml
@@ -0,0 +1,209 @@
+
+
+ 4.0.0
+
+ ${groupId}
+ ${artifactId}
+ ${version}
+ pom
+
+
+ ${rootArtifactId}-api
+ ${rootArtifactId}-app
+ ${rootArtifactId}-case
+ ${rootArtifactId}-domain
+ ${rootArtifactId}-trigger
+ ${rootArtifactId}-infrastructure
+ ${rootArtifactId}-types
+
+
+
+
+ nexus-aliyun
+ nexus-aliyun
+ http://maven.aliyun.com/nexus/content/groups/public/
+
+ true
+
+
+ false
+
+
+
+
+
+ 17
+ UTF-8
+ 17
+ 17
+ UTF-8
+
+
+
+
+ xiaofuge
+ 184172133@qq.com
+ fuzhengwei
+ https://github.com/fuzhengwei
+
+
+
+
+
+ Apache License, Version 2.0
+ https://www.apache.org/licenses/LICENSE-2.0
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 3.4.3
+
+
+
+
+
+ org.mybatis.spring.boot
+ mybatis-spring-boot-starter
+ 3.0.4
+
+
+
+ mysql
+ mysql-connector-java
+ 8.0.28
+
+
+ com.alibaba
+ fastjson
+ 2.0.28
+
+
+ org.apache.commons
+ commons-lang3
+ 3.9
+
+
+ com.google.guava
+ guava
+ 32.1.3-jre
+
+
+ dom4j
+ dom4j
+ 1.6.1
+
+
+ com.thoughtworks.xstream
+ xstream
+ 1.4.10
+
+
+ io.jsonwebtoken
+ jjwt
+ 0.9.1
+
+
+ com.auth0
+ java-jwt
+ 4.4.0
+
+
+ commons-codec
+ commons-codec
+ 1.15
+
+
+
+
+ ${groupId}
+ ${rootArtifactId}-api
+ ${version}
+
+
+ ${groupId}
+ ${rootArtifactId}-domain
+ ${version}
+
+
+ ${groupId}
+ ${rootArtifactId}-infrastructure
+ ${version}
+
+
+ ${groupId}
+ ${rootArtifactId}-types
+ ${version}
+
+
+ ${groupId}
+ ${rootArtifactId}-trigger
+ ${version}
+
+
+ ${groupId}
+ ${rootArtifactId}-case
+ ${version}
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.0
+
+ ${java.version}
+ ${java.version}
+ ${project.build.sourceEncoding}
+
+
+
+ org.apache.maven.plugins
+ maven-resources-plugin
+ 2.5
+
+ UTF-8
+
+
+
+ org.codehaus.mojo
+ versions-maven-plugin
+ 2.7
+
+
+
+
+
+
+ dev
+
+ true
+
+
+ -Xms1G -Xmx1G -server -XX:MaxPermSize=256M -Xss256K -Dspring.profiles.active=test -XX:+DisableExplicitGC -XX:+UseG1GC -XX:LargePageSizeInBytes=128m -XX:+UseFastAccessorMethods -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/export/Logs/${rootArtifactId}-boot -Xloggc:/export/Logs/${rootArtifactId}-boot/gc-${rootArtifactId}-boot.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps
+ dev
+
+
+
+ test
+
+ -Xms1G -Xmx1G -server -XX:MaxPermSize=256M -Xss256K -Dspring.profiles.active=test -XX:+DisableExplicitGC -XX:+UseG1GC -XX:LargePageSizeInBytes=128m -XX:+UseFastAccessorMethods -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/export/Logs/${rootArtifactId}-boot -Xloggc:/export/Logs/${rootArtifactId}-boot/gc-${rootArtifactId}-boot.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps
+ test
+
+
+
+ prod
+
+ -Xms6G -Xmx6G -server -XX:MaxPermSize=256M -Xss256K -Dspring.profiles.active=release -XX:+DisableExplicitGC -XX:+UseG1GC -XX:LargePageSizeInBytes=128m -XX:+UseFastAccessorMethods -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/export/Logs/fq-mall-activity-app -Xloggc:/export/Logs/${rootArtifactId}-boot/gc-${rootArtifactId}-boot.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps
+ prod
+
+
+
+
+
diff --git a/scaffold-std/src/test/resources/projects/basic/archetype.properties b/scaffold-std/src/test/resources/projects/basic/archetype.properties
new file mode 100644
index 0000000..3dd4899
--- /dev/null
+++ b/scaffold-std/src/test/resources/projects/basic/archetype.properties
@@ -0,0 +1,10 @@
+#Mon Oct 30 15:50:35 CST 2023
+package=cn.bugstack
+version=1.0.0-SNAPSHOT
+groupId=cn.bugstack
+artifactId=xfg-frame-archetype
+gitignore=.gitignore
+appName=xfg-ddd
+uAppName=XfgDDD
+author=system
+date=2023-10-24 10:24
\ No newline at end of file
diff --git a/scaffold-std/src/test/resources/projects/basic/goal.txt b/scaffold-std/src/test/resources/projects/basic/goal.txt
new file mode 100644
index 0000000..e69de29
--
GitLab