From 00330145a987f31b1b995ca6630552f8de2bcc8b 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, 3 Aug 2024 10:47:48 +0800
Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E5=82=85=E5=93=A5=EF=BC=8Cfeat?=
=?UTF-8?q?=EF=BC=9Av1.21?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pom.xml | 6 +++
scaffold-lite/README.md | 4 +-
scaffold-lite/pom.xml | 45 ++++++++++---------
.../META-INF/maven/archetype-metadata.xml | 11 +++++
.../__rootArtifactId__-api/pom.xml | 38 ++++++++++++++++
.../src/main/java/api/dto/package-info.java | 7 +++
.../src/main/java/api}/package-info.java | 5 ++-
.../src/main/java/api/response/Response.java | 25 +++++++++++
.../__rootArtifactId__-app/Dockerfile | 4 +-
.../__rootArtifactId__-app/pom.xml | 1 -
.../repository/package-info.java | 2 +-
.../domain/yyy/repository/package-info.java | 8 ----
.../adapter/port/package-info.java | 7 +++
.../repository/package-info.java | 2 +-
.../{persistent => }/dao/package-info.java | 2 +-
.../{persistent => dao}/po/package-info.java | 2 +-
.../gateway/dto/package-info.java | 4 --
.../infrastructure/gateway/package-info.java | 7 +++
.../{gateway/api => redis}/package-info.java | 5 ++-
.../resources/archetype-resources/pom.xml | 1 +
xfg-frame-archetype-lite-api/pom.xml | 40 +++++++++++++++++
.../cn/bugstack/api/dto/package-info.java | 4 ++
.../java/cn/bugstack/api/package-info.java | 4 ++
.../cn/bugstack/api/response/Response.java | 22 +++++++++
xfg-frame-archetype-lite-app/Dockerfile | 4 +-
.../mybatis/mapper/frame_case_mapper.xml | 8 ++--
.../xxx/adapter/{ => port}/package-info.java | 2 +-
.../repository/package-info.java | 2 +-
.../adapter/port/package-info.java | 4 ++
.../repository/package-info.java | 2 +-
.../infrastructure/dao/package-info.java | 4 ++
.../{persistent => dao}/po/package-info.java | 2 +-
.../gateway/adapter/package-info.java | 1 -
.../gateway/api/package-info.java | 1 -
.../infrastructure/gateway/package-info.java | 4 ++
.../persistent/dao/package-info.java | 4 --
.../infrastructure/redis/package-info.java | 4 ++
37 files changed, 237 insertions(+), 61 deletions(-)
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-api/pom.xml
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/api/dto/package-info.java
rename scaffold-lite/src/main/resources/archetype-resources/{__rootArtifactId__-infrastructure/src/main/java/infrastructure/gateway/adapter => __rootArtifactId__-api/src/main/java/api}/package-info.java (63%)
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/api/response/Response.java
rename scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/xxx/{ => adapter}/repository/package-info.java (78%)
delete 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__-infrastructure/src/main/java/infrastructure/adapter/port/package-info.java
rename scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/{persistent => adapter}/repository/package-info.java (79%)
rename scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/{persistent => }/dao/package-info.java (70%)
rename scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/{persistent => dao}/po/package-info.java (76%)
create mode 100644 scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/gateway/package-info.java
rename scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/{gateway/api => redis}/package-info.java (53%)
create mode 100644 xfg-frame-archetype-lite-api/pom.xml
create mode 100644 xfg-frame-archetype-lite-api/src/main/java/cn/bugstack/api/dto/package-info.java
create mode 100644 xfg-frame-archetype-lite-api/src/main/java/cn/bugstack/api/package-info.java
create mode 100644 xfg-frame-archetype-lite-api/src/main/java/cn/bugstack/api/response/Response.java
rename xfg-frame-archetype-lite-domain/src/main/java/cn/bugstack/domain/xxx/adapter/{ => port}/package-info.java (78%)
rename xfg-frame-archetype-lite-domain/src/main/java/cn/bugstack/domain/xxx/{ => adapter}/repository/package-info.java (64%)
create mode 100644 xfg-frame-archetype-lite-infrastructure/src/main/java/cn/bugstack/infrastructure/adapter/port/package-info.java
rename xfg-frame-archetype-lite-infrastructure/src/main/java/cn/bugstack/infrastructure/{persistent => adapter}/repository/package-info.java (68%)
create mode 100644 xfg-frame-archetype-lite-infrastructure/src/main/java/cn/bugstack/infrastructure/dao/package-info.java
rename xfg-frame-archetype-lite-infrastructure/src/main/java/cn/bugstack/infrastructure/{persistent => dao}/po/package-info.java (57%)
delete mode 100644 xfg-frame-archetype-lite-infrastructure/src/main/java/cn/bugstack/infrastructure/gateway/adapter/package-info.java
delete mode 100644 xfg-frame-archetype-lite-infrastructure/src/main/java/cn/bugstack/infrastructure/gateway/api/package-info.java
create mode 100644 xfg-frame-archetype-lite-infrastructure/src/main/java/cn/bugstack/infrastructure/gateway/package-info.java
delete mode 100644 xfg-frame-archetype-lite-infrastructure/src/main/java/cn/bugstack/infrastructure/persistent/dao/package-info.java
create mode 100644 xfg-frame-archetype-lite-infrastructure/src/main/java/cn/bugstack/infrastructure/redis/package-info.java
diff --git a/pom.xml b/pom.xml
index bb8f0b0..e595274 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,6 +13,7 @@
xfg-frame-archetype-lite-trigger
xfg-frame-archetype-lite-infrastructure
xfg-frame-archetype-lite-types
+ xfg-frame-archetype-lite-api
@@ -127,6 +128,11 @@
+
+ org.apache.maven.plugins
+ maven-archetype-plugin
+ 3.2.0
+
org.apache.maven.plugins
maven-compiler-plugin
diff --git a/scaffold-lite/README.md b/scaffold-lite/README.md
index 2153c34..2feea38 100644
--- a/scaffold-lite/README.md
+++ b/scaffold-lite/README.md
@@ -5,8 +5,8 @@
### 1. 生成
```shell
-md5 ddd-scaffold-lite-1.1.pom > ddd-scaffold-lite-1.1.pom.md5
-shasum ddd-scaffold-lite-1.1.pom > ddd-scaffold-lite-1.1.pom.sha1
+md5 ddd-scaffold-lite-1.21.pom > ddd-scaffold-lite-1.21.pom.md5
+shasum ddd-scaffold-lite-1.21.pom > ddd-scaffold-lite-1.21.pom.sha1
```
```shell
diff --git a/scaffold-lite/pom.xml b/scaffold-lite/pom.xml
index 533bd4a..5706e41 100644
--- a/scaffold-lite/pom.xml
+++ b/scaffold-lite/pom.xml
@@ -5,8 +5,9 @@
io.github.fuzhengwei
ddd-scaffold-lite
- 1.1
- maven-archetype
+ 1.21
+
+ jar
ddd-scaffold-lite
@@ -72,27 +73,27 @@
-Xdoclint:none
-
-
-
+
+ /Library/Java/JavaVirtualMachines/jdk1.8.0_311.jdk/Contents/Home/bin/javadoc
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+ 1.5
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+
+
org.apache.maven.plugins
maven-release-plugin
@@ -124,9 +125,9 @@
-Xdoclint:none
-
-
-
+
+ /Library/Java/JavaVirtualMachines/jdk1.8.0_311.jdk/Contents/Home/bin/javadoc
+
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
index d4108f0..252a01b 100644
--- a/scaffold-lite/src/main/resources/META-INF/maven/archetype-metadata.xml
+++ b/scaffold-lite/src/main/resources/META-INF/maven/archetype-metadata.xml
@@ -30,6 +30,17 @@
+
+
+
+ src/main/java
+
+ **/*.java
+
+
+
+
diff --git a/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-api/pom.xml b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-api/pom.xml
new file mode 100644
index 0000000..f004ba8
--- /dev/null
+++ b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-api/pom.xml
@@ -0,0 +1,38 @@
+
+
+ 4.0.0
+
+ ${groupId}
+ ${rootArtifactId}
+ ${version}
+
+
+ ${artifactId}
+
+
+
+ org.projectlombok
+ lombok
+ 1.18.26
+
+
+ jakarta.validation
+ jakarta.validation-api
+ 3.0.2
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+
+ ${java.version}
+
+
+
+
+
+
diff --git a/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/api/dto/package-info.java b/scaffold-lite/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-lite/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-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__-api/src/main/java/api/package-info.java
similarity index 63%
rename from scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/gateway/adapter/package-info.java
rename to scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/api/package-info.java
index eed8957..2bb5fc1 100644
--- 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__-api/src/main/java/api/package-info.java
@@ -1,4 +1,7 @@
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
-package ${package}.infrastructure.gateway.adapter;
\ No newline at end of file
+/**
+ * 定义api接口
+ */
+package ${package}.api;
\ No newline at end of file
diff --git a/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/api/response/Response.java b/scaffold-lite/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-lite/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-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/Dockerfile b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/Dockerfile
index 101a307..1b41401 100644
--- a/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/Dockerfile
+++ b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/Dockerfile
@@ -12,7 +12,7 @@ ENV TZ=PRC
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# 添加应用
-ADD target/${artifactId}-app.jar /${artifactId}-app.jar
+ADD target/${artifactId}.jar /${artifactId}.jar
## 在镜像运行为容器后执行的命令
-ENTRYPOINT ["sh","-c","java -jar $JAVA_OPTS /${artifactId}-app.jar $PARAMS"]
\ No newline at end of file
+ENTRYPOINT ["sh","-c","java -jar $JAVA_OPTS /${artifactId}.jar $PARAMS"]
\ 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
index fec4499..46333be 100644
--- a/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/pom.xml
+++ b/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-app/pom.xml
@@ -134,5 +134,4 @@
-
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/adapter/repository/package-info.java
similarity index 78%
rename from scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/xxx/repository/package-info.java
rename to scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/xxx/adapter/repository/package-info.java
index ab5d405..efc4bb7 100644
--- 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/adapter/repository/package-info.java
@@ -5,4 +5,4 @@
* 仓储服务
* 1. 定义仓储接口,之后由基础设施层做具体实现
*/
-package ${package}.domain.xxx.repository;
\ No newline at end of file
+package ${package}.domain.xxx.adapter.repository;
\ 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
deleted file mode 100644
index 84a49cf..0000000
--- a/scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/yyy/repository/package-info.java
+++ /dev/null
@@ -1,8 +0,0 @@
-#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__-infrastructure/src/main/java/infrastructure/adapter/port/package-info.java b/scaffold-lite/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-lite/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-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/adapter/repository/package-info.java
similarity index 79%
rename from scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/persistent/repository/package-info.java
rename to scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/adapter/repository/package-info.java
index 2b5a3bb..7a26e90 100644
--- 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/adapter/repository/package-info.java
@@ -4,4 +4,4 @@
/**
* 仓储实现;用于实现 domain 中定义的仓储接口,如;IXxxRepository 在 Repository 中调用服务
*/
-package ${package}.infrastructure.persistent.repository;
\ No newline at end of file
+package ${package}.infrastructure.adapter.repository;
\ 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/dao/package-info.java
similarity index 70%
rename from scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/persistent/dao/package-info.java
rename to scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/dao/package-info.java
index 2de1a8d..49d9714 100644
--- 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/dao/package-info.java
@@ -4,4 +4,4 @@
/**
* DAO 接口;IXxxDao
*/
-package ${package}.infrastructure.persistent.dao;
\ No newline at end of file
+package ${package}.infrastructure.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/dao/po/package-info.java
similarity index 76%
rename from scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/persistent/po/package-info.java
rename to scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/dao/po/package-info.java
index db590aa..361e73d 100644
--- 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/dao/po/package-info.java
@@ -4,4 +4,4 @@
/**
* 持久化对象;XxxPO 最后的 PO 是大写,UserPO
*/
-package ${package}.infrastructure.persistent.po;
\ No newline at end of file
+package ${package}.infrastructure.dao.po;
\ 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
index e873939..e69de29 100644
--- 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
@@ -1,4 +0,0 @@
-#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/gateway/package-info.java b/scaffold-lite/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-lite/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-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/redis/package-info.java
similarity index 53%
rename from scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/gateway/api/package-info.java
rename to scaffold-lite/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/infrastructure/redis/package-info.java
index f1d4da2..2c8ff3a 100644
--- 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/redis/package-info.java
@@ -1,4 +1,7 @@
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
-package ${package}.infrastructure.gateway.api;
\ No newline at end of file
+/**
+ * 提供redis链接配置
+ */
+package ${package}.infrastructure.redis;
\ 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
index 7b481b2..11d7f4b 100644
--- a/scaffold-lite/src/main/resources/archetype-resources/pom.xml
+++ b/scaffold-lite/src/main/resources/archetype-resources/pom.xml
@@ -8,6 +8,7 @@
pom
+ ${rootArtifactId}-api
${rootArtifactId}-app
${rootArtifactId}-domain
${rootArtifactId}-trigger
diff --git a/xfg-frame-archetype-lite-api/pom.xml b/xfg-frame-archetype-lite-api/pom.xml
new file mode 100644
index 0000000..af33845
--- /dev/null
+++ b/xfg-frame-archetype-lite-api/pom.xml
@@ -0,0 +1,40 @@
+
+
+ 4.0.0
+
+ cn.bugstack
+ xfg-frame-archetype-lite
+ 1.0-SNAPSHOT
+
+
+ xfg-frame-archetype-lite-api
+
+
+
+ org.projectlombok
+ lombok
+ 1.18.26
+
+
+ jakarta.validation
+ jakarta.validation-api
+ 3.0.2
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+
+ ${java.version}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/xfg-frame-archetype-lite-api/src/main/java/cn/bugstack/api/dto/package-info.java b/xfg-frame-archetype-lite-api/src/main/java/cn/bugstack/api/dto/package-info.java
new file mode 100644
index 0000000..6d98ae4
--- /dev/null
+++ b/xfg-frame-archetype-lite-api/src/main/java/cn/bugstack/api/dto/package-info.java
@@ -0,0 +1,4 @@
+/**
+ * 数据传输对象 xxxRequestDTO xxxResponseDTO
+ */
+package cn.bugstack.api.dto;
\ No newline at end of file
diff --git a/xfg-frame-archetype-lite-api/src/main/java/cn/bugstack/api/package-info.java b/xfg-frame-archetype-lite-api/src/main/java/cn/bugstack/api/package-info.java
new file mode 100644
index 0000000..a2e881f
--- /dev/null
+++ b/xfg-frame-archetype-lite-api/src/main/java/cn/bugstack/api/package-info.java
@@ -0,0 +1,4 @@
+/**
+ * 定义api接口
+ */
+package cn.bugstack.api;
\ No newline at end of file
diff --git a/xfg-frame-archetype-lite-api/src/main/java/cn/bugstack/api/response/Response.java b/xfg-frame-archetype-lite-api/src/main/java/cn/bugstack/api/response/Response.java
new file mode 100644
index 0000000..68365c2
--- /dev/null
+++ b/xfg-frame-archetype-lite-api/src/main/java/cn/bugstack/api/response/Response.java
@@ -0,0 +1,22 @@
+package cn.bugstack.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/xfg-frame-archetype-lite-app/Dockerfile b/xfg-frame-archetype-lite-app/Dockerfile
index 2d092d9..8e542cc 100644
--- a/xfg-frame-archetype-lite-app/Dockerfile
+++ b/xfg-frame-archetype-lite-app/Dockerfile
@@ -12,6 +12,6 @@ ENV TZ=PRC
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# 添加应用
-ADD target/xfg-frame-archetype-lite-app-app.jar /xfg-frame-archetype-lite-app-app.jar
+ADD target/xfg-frame-archetype-lite-app.jar /xfg-frame-archetype-lite-app.jar
-ENTRYPOINT ["sh","-c","java -jar $JAVA_OPTS /xfg-frame-archetype-lite-app-app.jar $PARAMS"]
\ No newline at end of file
+ENTRYPOINT ["sh","-c","java -jar $JAVA_OPTS /xfg-frame-archetype-lite-app.jar $PARAMS"]
\ No newline at end of file
diff --git a/xfg-frame-archetype-lite-app/src/main/resources/mybatis/mapper/frame_case_mapper.xml b/xfg-frame-archetype-lite-app/src/main/resources/mybatis/mapper/frame_case_mapper.xml
index 7e2ed51..2c3f77a 100644
--- a/xfg-frame-archetype-lite-app/src/main/resources/mybatis/mapper/frame_case_mapper.xml
+++ b/xfg-frame-archetype-lite-app/src/main/resources/mybatis/mapper/frame_case_mapper.xml
@@ -1,18 +1,18 @@
-
+
-
+
-
+
INSERT INTO table(a,b,c) VALUES(#{a}, #{b}, #{c})
-
+
UPDATE table SET a = #{a} WHERE b = #{b}
diff --git a/xfg-frame-archetype-lite-domain/src/main/java/cn/bugstack/domain/xxx/adapter/package-info.java b/xfg-frame-archetype-lite-domain/src/main/java/cn/bugstack/domain/xxx/adapter/port/package-info.java
similarity index 78%
rename from xfg-frame-archetype-lite-domain/src/main/java/cn/bugstack/domain/xxx/adapter/package-info.java
rename to xfg-frame-archetype-lite-domain/src/main/java/cn/bugstack/domain/xxx/adapter/port/package-info.java
index 9a649da..60230c3 100644
--- a/xfg-frame-archetype-lite-domain/src/main/java/cn/bugstack/domain/xxx/adapter/package-info.java
+++ b/xfg-frame-archetype-lite-domain/src/main/java/cn/bugstack/domain/xxx/adapter/port/package-info.java
@@ -1,4 +1,4 @@
/**
* 外部接口适配器层;当需要调用外部接口时,则创建出这一层,并定义接口,之后由基础设施层的 adapter 层具体实现
*/
-package cn.bugstack.domain.xxx.adapter;
\ No newline at end of file
+package cn.bugstack.domain.xxx.adapter.port;
\ No newline at end of file
diff --git a/xfg-frame-archetype-lite-domain/src/main/java/cn/bugstack/domain/xxx/repository/package-info.java b/xfg-frame-archetype-lite-domain/src/main/java/cn/bugstack/domain/xxx/adapter/repository/package-info.java
similarity index 64%
rename from xfg-frame-archetype-lite-domain/src/main/java/cn/bugstack/domain/xxx/repository/package-info.java
rename to xfg-frame-archetype-lite-domain/src/main/java/cn/bugstack/domain/xxx/adapter/repository/package-info.java
index 2834761..e70a903 100644
--- a/xfg-frame-archetype-lite-domain/src/main/java/cn/bugstack/domain/xxx/repository/package-info.java
+++ b/xfg-frame-archetype-lite-domain/src/main/java/cn/bugstack/domain/xxx/adapter/repository/package-info.java
@@ -2,4 +2,4 @@
* 仓储服务
* 1. 定义仓储接口,之后由基础设施层做具体实现
*/
-package cn.bugstack.domain.xxx.repository;
\ No newline at end of file
+package cn.bugstack.domain.xxx.adapter.repository;
\ No newline at end of file
diff --git a/xfg-frame-archetype-lite-infrastructure/src/main/java/cn/bugstack/infrastructure/adapter/port/package-info.java b/xfg-frame-archetype-lite-infrastructure/src/main/java/cn/bugstack/infrastructure/adapter/port/package-info.java
new file mode 100644
index 0000000..6a4e83b
--- /dev/null
+++ b/xfg-frame-archetype-lite-infrastructure/src/main/java/cn/bugstack/infrastructure/adapter/port/package-info.java
@@ -0,0 +1,4 @@
+/**
+ * 实现对外部的api调用,类的名称为 XxxPort 接口定义在 domain 中
+ */
+package cn.bugstack.infrastructure.adapter.port;
\ No newline at end of file
diff --git a/xfg-frame-archetype-lite-infrastructure/src/main/java/cn/bugstack/infrastructure/persistent/repository/package-info.java b/xfg-frame-archetype-lite-infrastructure/src/main/java/cn/bugstack/infrastructure/adapter/repository/package-info.java
similarity index 68%
rename from xfg-frame-archetype-lite-infrastructure/src/main/java/cn/bugstack/infrastructure/persistent/repository/package-info.java
rename to xfg-frame-archetype-lite-infrastructure/src/main/java/cn/bugstack/infrastructure/adapter/repository/package-info.java
index 18041e1..e9f7a34 100644
--- a/xfg-frame-archetype-lite-infrastructure/src/main/java/cn/bugstack/infrastructure/persistent/repository/package-info.java
+++ b/xfg-frame-archetype-lite-infrastructure/src/main/java/cn/bugstack/infrastructure/adapter/repository/package-info.java
@@ -1,4 +1,4 @@
/**
* 仓储实现;用于实现 domain 中定义的仓储接口,如;IXxxRepository 在 Repository 中调用服务
*/
-package cn.bugstack.infrastructure.persistent.repository;
\ No newline at end of file
+package cn.bugstack.infrastructure.adapter.repository;
\ No newline at end of file
diff --git a/xfg-frame-archetype-lite-infrastructure/src/main/java/cn/bugstack/infrastructure/dao/package-info.java b/xfg-frame-archetype-lite-infrastructure/src/main/java/cn/bugstack/infrastructure/dao/package-info.java
new file mode 100644
index 0000000..bbb404c
--- /dev/null
+++ b/xfg-frame-archetype-lite-infrastructure/src/main/java/cn/bugstack/infrastructure/dao/package-info.java
@@ -0,0 +1,4 @@
+/**
+ * DAO 接口;IXxxDao
+ */
+package cn.bugstack.infrastructure.dao;
\ No newline at end of file
diff --git a/xfg-frame-archetype-lite-infrastructure/src/main/java/cn/bugstack/infrastructure/persistent/po/package-info.java b/xfg-frame-archetype-lite-infrastructure/src/main/java/cn/bugstack/infrastructure/dao/po/package-info.java
similarity index 57%
rename from xfg-frame-archetype-lite-infrastructure/src/main/java/cn/bugstack/infrastructure/persistent/po/package-info.java
rename to xfg-frame-archetype-lite-infrastructure/src/main/java/cn/bugstack/infrastructure/dao/po/package-info.java
index 0ff65fe..d123c7c 100644
--- a/xfg-frame-archetype-lite-infrastructure/src/main/java/cn/bugstack/infrastructure/persistent/po/package-info.java
+++ b/xfg-frame-archetype-lite-infrastructure/src/main/java/cn/bugstack/infrastructure/dao/po/package-info.java
@@ -1,4 +1,4 @@
/**
* 持久化对象;XxxPO 最后的 PO 是大写,UserPO
*/
-package cn.bugstack.infrastructure.persistent.po;
\ No newline at end of file
+package cn.bugstack.infrastructure.dao.po;
\ No newline at end of file
diff --git a/xfg-frame-archetype-lite-infrastructure/src/main/java/cn/bugstack/infrastructure/gateway/adapter/package-info.java b/xfg-frame-archetype-lite-infrastructure/src/main/java/cn/bugstack/infrastructure/gateway/adapter/package-info.java
deleted file mode 100644
index c79e366..0000000
--- a/xfg-frame-archetype-lite-infrastructure/src/main/java/cn/bugstack/infrastructure/gateway/adapter/package-info.java
+++ /dev/null
@@ -1 +0,0 @@
-package cn.bugstack.infrastructure.gateway.adapter;
\ No newline at end of file
diff --git a/xfg-frame-archetype-lite-infrastructure/src/main/java/cn/bugstack/infrastructure/gateway/api/package-info.java b/xfg-frame-archetype-lite-infrastructure/src/main/java/cn/bugstack/infrastructure/gateway/api/package-info.java
deleted file mode 100644
index e1319b9..0000000
--- a/xfg-frame-archetype-lite-infrastructure/src/main/java/cn/bugstack/infrastructure/gateway/api/package-info.java
+++ /dev/null
@@ -1 +0,0 @@
-package cn.bugstack.infrastructure.gateway.api;
\ No newline at end of file
diff --git a/xfg-frame-archetype-lite-infrastructure/src/main/java/cn/bugstack/infrastructure/gateway/package-info.java b/xfg-frame-archetype-lite-infrastructure/src/main/java/cn/bugstack/infrastructure/gateway/package-info.java
new file mode 100644
index 0000000..292c86f
--- /dev/null
+++ b/xfg-frame-archetype-lite-infrastructure/src/main/java/cn/bugstack/infrastructure/gateway/package-info.java
@@ -0,0 +1,4 @@
+/**
+ * 定义http、rpc接口,调用外部。在 adapter 中调用这部分内容。
+ */
+package cn.bugstack.infrastructure.gateway;
\ No newline at end of file
diff --git a/xfg-frame-archetype-lite-infrastructure/src/main/java/cn/bugstack/infrastructure/persistent/dao/package-info.java b/xfg-frame-archetype-lite-infrastructure/src/main/java/cn/bugstack/infrastructure/persistent/dao/package-info.java
deleted file mode 100644
index 7e6cb8b..0000000
--- a/xfg-frame-archetype-lite-infrastructure/src/main/java/cn/bugstack/infrastructure/persistent/dao/package-info.java
+++ /dev/null
@@ -1,4 +0,0 @@
-/**
- * DAO 接口;IXxxDao
- */
-package cn.bugstack.infrastructure.persistent.dao;
\ No newline at end of file
diff --git a/xfg-frame-archetype-lite-infrastructure/src/main/java/cn/bugstack/infrastructure/redis/package-info.java b/xfg-frame-archetype-lite-infrastructure/src/main/java/cn/bugstack/infrastructure/redis/package-info.java
new file mode 100644
index 0000000..6c4af59
--- /dev/null
+++ b/xfg-frame-archetype-lite-infrastructure/src/main/java/cn/bugstack/infrastructure/redis/package-info.java
@@ -0,0 +1,4 @@
+/**
+ * 提供redis链接配置
+ */
+package cn.bugstack.infrastructure.redis;
\ No newline at end of file
--
GitLab