From 96368059068621e2f0682b84f930971fc9e62b3f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=B0=8F=E5=82=85=E5=93=A5?= <184172133@qq.com>
Date: Sat, 4 Nov 2023 21:07:09 +0800
Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E5=82=85=E5=93=A5=EF=BC=8Cfeat?=
=?UTF-8?q?=EF=BC=9Amaven=20=E5=B7=A5=E7=A8=8B=E8=84=9A=E6=89=8B=E6=9E=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
scaffold-lite/.gitignore | 38 ++++
scaffold-lite/README.md | 142 ++++++++++++++
scaffold-lite/pom.xml | 54 ++++++
.../META-INF/maven/archetype-metadata.xml | 105 ++++++++++
.../resources/archetype-resources/README.md | 2 +
.../__rootArtifactId__-app/Dockerfile | 18 ++
.../__rootArtifactId__-app/build.sh | 9 +
.../__rootArtifactId__-app/pom.xml | 138 +++++++++++++
.../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 | 44 +++++
.../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__-domain/pom.xml | 75 +++++++
.../java/domain/xxx/adapter/package-info.java | 7 +
.../xxx/model/aggregate/package-info.java | 10 +
.../domain/xxx/model/entity/package-info.java | 10 +
.../domain/xxx/model/valobj/package-info.java | 9 +
.../domain/xxx/repository/package-info.java | 8 +
.../java/domain/xxx/service/package-info.java | 4 +
.../yyy/model/aggregate/package-info.java | 10 +
.../domain/yyy/model/entity/package-info.java | 10 +
.../domain/yyy/model/valobj/package-info.java | 9 +
.../domain/yyy/repository/package-info.java | 8 +
.../java/domain/yyy/service/package-info.java | 4 +
.../__rootArtifactId__-infrastructure/pom.xml | 46 +++++
.../gateway/adapter/package-info.java | 4 +
.../gateway/api/package-info.java | 4 +
.../gateway/dto/package-info.java | 4 +
.../persistent/dao/package-info.java | 7 +
.../persistent/po/package-info.java | 7 +
.../persistent/repository/package-info.java | 7 +
.../__rootArtifactId__-trigger/pom.xml | 59 ++++++
.../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 | 53 +++++
.../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/docker-compose-1.0.yml | 21 ++
.../docs/dev-ops/app/start.sh | 20 ++
.../docs/dev-ops/app/stop.sh | 1 +
.../docs/dev-ops/mysql/docker-compose.yml | 29 +++
.../dev-ops/mysql/sql/xfg-frame-archetype.sql | 108 +++++++++++
.../resources/archetype-resources/pom.xml | 183 ++++++++++++++++++
.../projects/basic/archetype.properties | 10 +
.../test/resources/projects/basic/goal.txt | 0
57 files changed, 1794 insertions(+)
create mode 100644 scaffold-lite/.gitignore
create mode 100644 scaffold-lite/README.md
create mode 100644 scaffold-lite/pom.xml
create mode 100644 scaffold-lite/src/main/resources/META-INF/maven/archetype-metadata.xml
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/README.md
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/Dockerfile
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/build.sh
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/pom.xml
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/Application.java
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/config/GuavaConfig.java
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/config/ThreadPoolConfig.java
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/config/ThreadPoolConfigProperties.java
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/config/package-info.java
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/package-info.java
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/application-dev.yml
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/application-prod.yml
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/application-test.yml
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/application.yml
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/logback-spring.xml
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/mybatis/config/mybatis-config.xml
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/mybatis/mapper/frame_case_mapper.xml
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/src/test/java/test/ApiTest.java
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-domain/pom.xml
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/xxx/adapter/package-info.java
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/xxx/model/aggregate/package-info.java
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/xxx/model/entity/package-info.java
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/xxx/model/valobj/package-info.java
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/xxx/repository/package-info.java
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/xxx/service/package-info.java
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/yyy/model/aggregate/package-info.java
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/yyy/model/entity/package-info.java
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/yyy/model/valobj/package-info.java
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/yyy/repository/package-info.java
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/yyy/service/package-info.java
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/pom.xml
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/gateway/adapter/package-info.java
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/gateway/api/package-info.java
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/gateway/dto/package-info.java
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/persistent/dao/package-info.java
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/persistent/po/package-info.java
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/persistent/repository/package-info.java
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-trigger/pom.xml
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-trigger/src/main/java/trigger/http/package-info.java
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-trigger/src/main/java/trigger/job/package-info.java
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-trigger/src/main/java/trigger/listener/package-info.java
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-types/pom.xml
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-types/src/main/java/types/common/Constants.java
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-types/src/main/java/types/enums/ResponseCode.java
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-types/src/main/java/types/exception/AppException.java
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/docs/dev-ops/app/docker-compose-1.0.yml
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/docs/dev-ops/app/start.sh
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/docs/dev-ops/app/stop.sh
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/docs/dev-ops/mysql/docker-compose.yml
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/docs/dev-ops/mysql/sql/xfg-frame-archetype.sql
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/pom.xml
create mode 100644 scaffold-lite/src/test/resources/projects/basic/archetype.properties
create mode 100644 scaffold-lite/src/test/resources/projects/basic/goal.txt
diff --git a/scaffold-lite/.gitignore b/scaffold-lite/.gitignore
new file mode 100644
index 0000000..5ff6309
--- /dev/null
+++ b/scaffold-lite/.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-lite/README.md b/scaffold-lite/README.md
new file mode 100644
index 0000000..f16df78
--- /dev/null
+++ b/scaffold-lite/README.md
@@ -0,0 +1,142 @@
+# xfg-frame-archetype - DDD 脚手架
+
+## 1. 脚手架安装使用
+
+### 1. 生成
+
+```shell
+mvn clean install
+```
+
+- 在 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-lite/pom.xml b/scaffold-lite/pom.xml
new file mode 100644
index 0000000..3d5442b
--- /dev/null
+++ b/scaffold-lite/pom.xml
@@ -0,0 +1,54 @@
+
+
+ 4.0.0
+
+ cn.bugstack
+ scaffold-lite
+ 1.0
+ maven-archetype
+
+ xfg-frame-archetype
+
+
+
+
+ org.apache.maven.archetype
+ archetype-packaging
+ 3.2.0
+
+
+
+
+
+
+ maven-archetype-plugin
+ 3.2.0
+
+
+
+
+
+ Parent pom providing dependency and plugin management for applications built with Maven
+
+ https://spring.io/projects/spring-boot/xfg-frame-archetype
+
+
+
+ fuzhengwei
+ 184172133@qq.com
+ fuzhengwei
+ https://github.com/fuzhengwei
+
+
+
+
+
+ Apache License, Version 2.0
+ https://www.apache.org/licenses/LICENSE-2.0
+
+
+
+
+ https://github.com/spring-projects/spring-boot/xfg-frame-archetype
+
+
diff --git a/scaffold-lite/src/main/resources/META-INF/maven/archetype-metadata.xml b/scaffold-lite/src/main/resources/META-INF/maven/archetype-metadata.xml
new file mode 100644
index 0000000..d4108f0
--- /dev/null
+++ b/scaffold-lite/src/main/resources/META-INF/maven/archetype-metadata.xml
@@ -0,0 +1,105 @@
+
+
+
+
+
+ docs/dev-ops
+
+ **/*.yml
+
+
+
+ docs/dev-ops
+
+ **/*.sql
+ **/*.yml
+ **/*.sh
+
+
+
+
+
+ README.md
+ __gitignore__
+
+
+
+
+
+
+
+
+ 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-lite/src/main/resources/archetype-resources/README.md b/scaffold-lite/src/main/resources/archetype-resources/README.md
new file mode 100644
index 0000000..48264e4
--- /dev/null
+++ b/scaffold-lite/src/main/resources/archetype-resources/README.md
@@ -0,0 +1,2 @@
+# xfg-frame-archetype - DDD 脚手架
+
diff --git a/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/Dockerfile b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/Dockerfile
new file mode 100644
index 0000000..101a307
--- /dev/null
+++ b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/Dockerfile
@@ -0,0 +1,18 @@
+# 基础镜像
+FROM openjdk:8-jre-slim
+
+# 作者
+MAINTAINER xiaofuge
+
+# 配置
+ENV PARAMS=""
+
+# 时区
+ENV TZ=PRC
+RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
+
+# 添加应用
+ADD target/${artifactId}-app.jar /${artifactId}-app.jar
+
+## 在镜像运行为容器后执行的命令
+ENTRYPOINT ["sh","-c","java -jar $JAVA_OPTS /${artifactId}-app.jar $PARAMS"]
\ No newline at end of file
diff --git a/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/build.sh b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/build.sh
new file mode 100644
index 0000000..0d9734d
--- /dev/null
+++ b/scaffold-lite/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-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/pom.xml b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/pom.xml
new file mode 100644
index 0000000..fec4499
--- /dev/null
+++ b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/pom.xml
@@ -0,0 +1,138 @@
+
+
+ 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-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/Application.java b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/Application.java
new file mode 100644
index 0000000..7dbb4d1
--- /dev/null
+++ b/scaffold-lite/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-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/config/GuavaConfig.java b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/config/GuavaConfig.java
new file mode 100644
index 0000000..4a804f9
--- /dev/null
+++ b/scaffold-lite/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-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/config/ThreadPoolConfig.java b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/config/ThreadPoolConfig.java
new file mode 100644
index 0000000..4852cdd
--- /dev/null
+++ b/scaffold-lite/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-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/config/ThreadPoolConfigProperties.java b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/config/ThreadPoolConfigProperties.java
new file mode 100644
index 0000000..a61b5b3
--- /dev/null
+++ b/scaffold-lite/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-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/config/package-info.java b/scaffold-lite/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-lite/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-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/package-info.java b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/package-info.java
new file mode 100644
index 0000000..fb96c75
--- /dev/null
+++ b/scaffold-lite/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-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/application-dev.yml b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/application-dev.yml
new file mode 100644
index 0000000..2533fa0
--- /dev/null
+++ b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/application-dev.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-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/application-prod.yml b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/application-prod.yml
new file mode 100644
index 0000000..d27dd84
--- /dev/null
+++ b/scaffold-lite/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-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/application-test.yml b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/application-test.yml
new file mode 100644
index 0000000..d27dd84
--- /dev/null
+++ b/scaffold-lite/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-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/application.yml b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/application.yml
new file mode 100644
index 0000000..4570423
--- /dev/null
+++ b/scaffold-lite/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-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/logback-spring.xml b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/logback-spring.xml
new file mode 100644
index 0000000..2712e06
--- /dev/null
+++ b/scaffold-lite/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-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/mybatis/config/mybatis-config.xml b/scaffold-lite/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-lite/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-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/resources/mybatis/mapper/frame_case_mapper.xml b/scaffold-lite/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-lite/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-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/src/test/java/test/ApiTest.java b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/src/test/java/test/ApiTest.java
new file mode 100644
index 0000000..8375bba
--- /dev/null
+++ b/scaffold-lite/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-lite/src/main/resources/archetype-resources/__rootArtifactId__-domain/pom.xml b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-domain/pom.xml
new file mode 100644
index 0000000..bcb18a7
--- /dev/null
+++ b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-domain/pom.xml
@@ -0,0 +1,75 @@
+
+
+ 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-archetype-plugin
+ 3.2.0
+
+
+
+ create-from-project
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+ ${java.version}
+ ${java.version}
+ ${java.version}
+
+
+
+
+
+
diff --git a/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/xxx/adapter/package-info.java b/scaffold-lite/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-lite/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-lite/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/xxx/model/aggregate/package-info.java b/scaffold-lite/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-lite/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-lite/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/xxx/model/entity/package-info.java b/scaffold-lite/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-lite/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-lite/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/xxx/model/valobj/package-info.java b/scaffold-lite/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-lite/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-lite/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/xxx/repository/package-info.java b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/xxx/repository/package-info.java
new file mode 100644
index 0000000..ab5d405
--- /dev/null
+++ b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/xxx/repository/package-info.java
@@ -0,0 +1,8 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * 仓储服务
+ * 1. 定义仓储接口,之后由基础设施层做具体实现
+ */
+package ${package}.domain.xxx.repository;
\ No newline at end of file
diff --git a/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/xxx/service/package-info.java b/scaffold-lite/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-lite/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-lite/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/yyy/model/aggregate/package-info.java b/scaffold-lite/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-lite/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-lite/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/yyy/model/entity/package-info.java b/scaffold-lite/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-lite/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-lite/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/yyy/model/valobj/package-info.java b/scaffold-lite/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-lite/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-lite/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/yyy/repository/package-info.java b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/yyy/repository/package-info.java
new file mode 100644
index 0000000..84a49cf
--- /dev/null
+++ b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/yyy/repository/package-info.java
@@ -0,0 +1,8 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * 仓储服务
+ * 1. 定义仓储接口,之后由基础设施层做具体实现
+ */
+package ${package}.domain.yyy.repository;
\ No newline at end of file
diff --git a/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/yyy/service/package-info.java b/scaffold-lite/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-lite/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-lite/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/pom.xml b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/pom.xml
new file mode 100644
index 0000000..a3f7ba3
--- /dev/null
+++ b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/pom.xml
@@ -0,0 +1,46 @@
+
+
+ 4.0.0
+
+ ${groupId}
+ ${rootArtifactId}
+ ${version}
+
+
+ ${artifactId}
+
+
+
+ org.mybatis.spring.boot
+ mybatis-spring-boot-starter
+
+
+ org.projectlombok
+ lombok
+
+
+
+ ${groupId}
+ ${rootArtifactId}-domain
+
+
+
+
+ ${rootArtifactId}-infrastructure
+
+
+ org.apache.maven.plugins
+ maven-archetype-plugin
+ 3.2.0
+
+
+
+ create-from-project
+
+
+
+
+
+
+
+
diff --git a/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/gateway/adapter/package-info.java b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/gateway/adapter/package-info.java
new file mode 100644
index 0000000..eed8957
--- /dev/null
+++ b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/gateway/adapter/package-info.java
@@ -0,0 +1,4 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+package ${package}.infrastructure.gateway.adapter;
\ No newline at end of file
diff --git a/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/gateway/api/package-info.java b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/gateway/api/package-info.java
new file mode 100644
index 0000000..f1d4da2
--- /dev/null
+++ b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/gateway/api/package-info.java
@@ -0,0 +1,4 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+package ${package}.infrastructure.gateway.api;
\ No newline at end of file
diff --git a/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/gateway/dto/package-info.java b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/gateway/dto/package-info.java
new file mode 100644
index 0000000..e873939
--- /dev/null
+++ b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/gateway/dto/package-info.java
@@ -0,0 +1,4 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+package ${package}.infrastructure.gateway.dto;
\ No newline at end of file
diff --git a/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/persistent/dao/package-info.java b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/persistent/dao/package-info.java
new file mode 100644
index 0000000..2de1a8d
--- /dev/null
+++ b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/persistent/dao/package-info.java
@@ -0,0 +1,7 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * DAO 接口;IXxxDao
+ */
+package ${package}.infrastructure.persistent.dao;
\ No newline at end of file
diff --git a/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/persistent/po/package-info.java b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/persistent/po/package-info.java
new file mode 100644
index 0000000..db590aa
--- /dev/null
+++ b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/persistent/po/package-info.java
@@ -0,0 +1,7 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * 持久化对象;XxxPO 最后的 PO 是大写,UserPO
+ */
+package ${package}.infrastructure.persistent.po;
\ No newline at end of file
diff --git a/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/persistent/repository/package-info.java b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/persistent/repository/package-info.java
new file mode 100644
index 0000000..2b5a3bb
--- /dev/null
+++ b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/persistent/repository/package-info.java
@@ -0,0 +1,7 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * 仓储实现;用于实现 domain 中定义的仓储接口,如;IXxxRepository 在 Repository 中调用服务
+ */
+package ${package}.infrastructure.persistent.repository;
\ No newline at end of file
diff --git a/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-trigger/pom.xml b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-trigger/pom.xml
new file mode 100644
index 0000000..c73d6cd
--- /dev/null
+++ b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-trigger/pom.xml
@@ -0,0 +1,59 @@
+
+
+ 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}-types
+
+
+ ${groupId}
+ ${rootArtifactId}-domain
+
+
+
+
+ ${rootArtifactId}-trigger
+
+
+ org.apache.maven.plugins
+ maven-archetype-plugin
+ 3.2.0
+
+
+
+ create-from-project
+
+
+
+
+
+
+
+
diff --git a/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-trigger/src/main/java/trigger/http/package-info.java b/scaffold-lite/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-lite/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-lite/src/main/resources/archetype-resources/__rootArtifactId__-trigger/src/main/java/trigger/job/package-info.java b/scaffold-lite/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-lite/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-lite/src/main/resources/archetype-resources/__rootArtifactId__-trigger/src/main/java/trigger/listener/package-info.java b/scaffold-lite/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-lite/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-lite/src/main/resources/archetype-resources/__rootArtifactId__-types/pom.xml b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-types/pom.xml
new file mode 100644
index 0000000..a11d72e
--- /dev/null
+++ b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-types/pom.xml
@@ -0,0 +1,53 @@
+
+
+ 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
+
+
+ org.apache.maven.plugins
+ maven-archetype-plugin
+ 3.2.0
+
+
+
+ create-from-project
+
+
+
+
+
+
+
+
diff --git a/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-types/src/main/java/types/common/Constants.java b/scaffold-lite/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-lite/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-lite/src/main/resources/archetype-resources/__rootArtifactId__-types/src/main/java/types/enums/ResponseCode.java b/scaffold-lite/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-lite/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-lite/src/main/resources/archetype-resources/__rootArtifactId__-types/src/main/java/types/exception/AppException.java b/scaffold-lite/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-lite/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-lite/src/main/resources/archetype-resources/docs/dev-ops/app/docker-compose-1.0.yml b/scaffold-lite/src/main/resources/archetype-resources/docs/dev-ops/app/docker-compose-1.0.yml
new file mode 100644
index 0000000..3e0fa1b
--- /dev/null
+++ b/scaffold-lite/src/main/resources/archetype-resources/docs/dev-ops/app/docker-compose-1.0.yml
@@ -0,0 +1,21 @@
+# /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-1.0.yml up -d
+# 你需要修改system为你自身系统的仓库名
+services:
+ x-api-app:
+ 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"
\ No newline at end of file
diff --git a/scaffold-lite/src/main/resources/archetype-resources/docs/dev-ops/app/start.sh b/scaffold-lite/src/main/resources/archetype-resources/docs/dev-ops/app/start.sh
new file mode 100644
index 0000000..84b1c36
--- /dev/null
+++ b/scaffold-lite/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-lite/src/main/resources/archetype-resources/docs/dev-ops/app/stop.sh b/scaffold-lite/src/main/resources/archetype-resources/docs/dev-ops/app/stop.sh
new file mode 100644
index 0000000..c50d125
--- /dev/null
+++ b/scaffold-lite/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-lite/src/main/resources/archetype-resources/docs/dev-ops/mysql/docker-compose.yml b/scaffold-lite/src/main/resources/archetype-resources/docs/dev-ops/mysql/docker-compose.yml
new file mode 100644
index 0000000..f7930e8
--- /dev/null
+++ b/scaffold-lite/src/main/resources/archetype-resources/docs/dev-ops/mysql/docker-compose.yml
@@ -0,0 +1,29 @@
+# 命令执行 docker-compose up -d
+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_ALLOW_EMPTY_PASSWORD: 'yes' # 可配置无密码,注意配置 SPRING_DATASOURCE_PASSWORD=
+ MYSQL_ROOT_PASSWORD: 123456
+ MYSQL_USER: xfg
+ MYSQL_PASSWORD: 123456
+ depends_on:
+ - mysql-job-dbdata
+ ports:
+ - "3306:3306"
+ volumes:
+ - ./sql:/docker-entrypoint-initdb.d
+ volumes_from:
+ - mysql-job-dbdata
+
+ # 自动加载数据
+ mysql-job-dbdata:
+ image: alpine:3.18.2
+ container_name: mysql-job-dbdata
+ volumes:
+ - /var/lib/mysql
\ No newline at end of file
diff --git a/scaffold-lite/src/main/resources/archetype-resources/docs/dev-ops/mysql/sql/xfg-frame-archetype.sql b/scaffold-lite/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-lite/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-lite/src/main/resources/archetype-resources/pom.xml b/scaffold-lite/src/main/resources/archetype-resources/pom.xml
new file mode 100644
index 0000000..f921cf4
--- /dev/null
+++ b/scaffold-lite/src/main/resources/archetype-resources/pom.xml
@@ -0,0 +1,183 @@
+
+
+ 4.0.0
+
+ ${groupId}
+ ${artifactId}
+ ${version}
+ pom
+
+
+ ${rootArtifactId}-app
+ ${rootArtifactId}-domain
+ ${rootArtifactId}-trigger
+ ${rootArtifactId}-infrastructure
+ ${rootArtifactId}-types
+
+
+
+ 1.8
+ UTF-8
+ 8
+ 8
+ 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
+ 2.7.12
+
+
+
+
+
+ org.mybatis.spring.boot
+ mybatis-spring-boot-starter
+ 2.1.4
+
+
+
+ mysql
+ mysql-connector-java
+ 8.0.22
+
+
+ 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}-domain
+ ${version}
+
+
+ ${groupId}
+ ${rootArtifactId}-infrastructure
+ ${version}
+
+
+ ${groupId}
+ ${rootArtifactId}-types
+ ${version}
+
+
+ ${groupId}
+ ${rootArtifactId}-trigger
+ ${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-lite/src/test/resources/projects/basic/archetype.properties b/scaffold-lite/src/test/resources/projects/basic/archetype.properties
new file mode 100644
index 0000000..3dd4899
--- /dev/null
+++ b/scaffold-lite/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-lite/src/test/resources/projects/basic/goal.txt b/scaffold-lite/src/test/resources/projects/basic/goal.txt
new file mode 100644
index 0000000..e69de29
--
GitLab