提交 00330145 编写于 作者: 小傅哥's avatar 小傅哥

小傅哥,feat:v1.21

上级 8c6cd600
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
<module>xfg-frame-archetype-lite-trigger</module> <module>xfg-frame-archetype-lite-trigger</module>
<module>xfg-frame-archetype-lite-infrastructure</module> <module>xfg-frame-archetype-lite-infrastructure</module>
<module>xfg-frame-archetype-lite-types</module> <module>xfg-frame-archetype-lite-types</module>
<module>xfg-frame-archetype-lite-api</module>
</modules> </modules>
<properties> <properties>
...@@ -127,6 +128,11 @@ ...@@ -127,6 +128,11 @@
<build> <build>
<plugins> <plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-archetype-plugin</artifactId>
<version>3.2.0</version>
</plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
### 1. 生成 ### 1. 生成
```shell ```shell
md5 ddd-scaffold-lite-1.1.pom > ddd-scaffold-lite-1.1.pom.md5 md5 ddd-scaffold-lite-1.21.pom > ddd-scaffold-lite-1.21.pom.md5
shasum ddd-scaffold-lite-1.1.pom > ddd-scaffold-lite-1.1.pom.sha1 shasum ddd-scaffold-lite-1.21.pom > ddd-scaffold-lite-1.21.pom.sha1
``` ```
```shell ```shell
......
...@@ -5,8 +5,9 @@ ...@@ -5,8 +5,9 @@
<groupId>io.github.fuzhengwei</groupId> <groupId>io.github.fuzhengwei</groupId>
<artifactId>ddd-scaffold-lite</artifactId> <artifactId>ddd-scaffold-lite</artifactId>
<version>1.1</version> <version>1.21</version>
<packaging>maven-archetype</packaging> <!-- <packaging>maven-archetype</packaging>-->
<packaging>jar</packaging>
<name>ddd-scaffold-lite</name> <name>ddd-scaffold-lite</name>
...@@ -72,27 +73,27 @@ ...@@ -72,27 +73,27 @@
</goals> </goals>
<configuration> <configuration>
<additionalparam>-Xdoclint:none</additionalparam> <additionalparam>-Xdoclint:none</additionalparam>
<!-- <javadocExecutable>--> <javadocExecutable>
<!-- /Library/Java/JavaVirtualMachines/jdk1.8.0_311.jdk/Contents/Home/bin/javadoc--> /Library/Java/JavaVirtualMachines/jdk1.8.0_311.jdk/Contents/Home/bin/javadoc
<!-- </javadocExecutable>--> </javadocExecutable>
</configuration> </configuration>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<!-- <plugin>--> <plugin>
<!-- <groupId>org.apache.maven.plugins</groupId>--> <groupId>org.apache.maven.plugins</groupId>
<!-- <artifactId>maven-gpg-plugin</artifactId>--> <artifactId>maven-gpg-plugin</artifactId>
<!-- <version>1.5</version>--> <version>1.5</version>
<!-- <executions>--> <executions>
<!-- <execution>--> <execution>
<!-- <id>sign-artifacts</id>--> <id>sign-artifacts</id>
<!-- <phase>verify</phase>--> <phase>verify</phase>
<!-- <goals>--> <goals>
<!-- <goal>sign</goal>--> <goal>sign</goal>
<!-- </goals>--> </goals>
<!-- </execution>--> </execution>
<!-- </executions>--> </executions>
<!-- </plugin>--> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId> <artifactId>maven-release-plugin</artifactId>
...@@ -124,9 +125,9 @@ ...@@ -124,9 +125,9 @@
</goals> </goals>
<configuration> <configuration>
<additionalparam>-Xdoclint:none</additionalparam> <additionalparam>-Xdoclint:none</additionalparam>
<!-- <javadocExecutable>--> <javadocExecutable>
<!-- /Library/Java/JavaVirtualMachines/jdk1.8.0_311.jdk/Contents/Home/bin/javadoc--> /Library/Java/JavaVirtualMachines/jdk1.8.0_311.jdk/Contents/Home/bin/javadoc
<!-- </javadocExecutable>--> </javadocExecutable>
</configuration> </configuration>
</execution> </execution>
</executions> </executions>
......
...@@ -30,6 +30,17 @@ ...@@ -30,6 +30,17 @@
</fileSets> </fileSets>
<modules> <modules>
<module id="${rootArtifactId}-api" dir="__rootArtifactId__-api"
name="${rootArtifactId}-api">
<fileSets>
<fileSet filtered="true" packaged="true" encoding="UTF-8">
<directory>src/main/java</directory>
<includes>
<include>**/*.java</include>
</includes>
</fileSet>
</fileSets>
</module>
<module id="${rootArtifactId}-app" dir="__rootArtifactId__-app" name="${rootArtifactId}-app"> <module id="${rootArtifactId}-app" dir="__rootArtifactId__-app" name="${rootArtifactId}-app">
<fileSets> <fileSets>
<fileSet filtered="true" packaged="true" encoding="UTF-8"> <fileSet filtered="true" packaged="true" encoding="UTF-8">
......
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}</artifactId>
<version>${version}</version>
</parent>
<artifactId>${artifactId}</artifactId>
<dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.26</version>
</dependency>
<dependency>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
<version>3.0.2</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
/**
* 数据传输对象 xxxRequestDTO xxxResponseDTO
*/
package ${package}.api.dto;
\ No newline at end of file
#set( $symbol_pound = '#' ) #set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' ) #set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' ) #set( $symbol_escape = '\' )
package ${package}.infrastructure.gateway.adapter; /**
\ No newline at end of file * 定义api接口
*/
package ${package}.api;
\ No newline at end of file
#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<T> implements Serializable {
private static final long serialVersionUID = 7000723935764546321L;
private String code;
private String info;
private T data;
}
...@@ -12,7 +12,7 @@ ENV TZ=PRC ...@@ -12,7 +12,7 @@ ENV TZ=PRC
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone 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"] ENTRYPOINT ["sh","-c","java -jar $JAVA_OPTS /${artifactId}.jar $PARAMS"]
\ No newline at end of file \ No newline at end of file
...@@ -134,5 +134,4 @@ ...@@ -134,5 +134,4 @@
</plugins> </plugins>
</build> </build>
</project> </project>
...@@ -5,4 +5,4 @@ ...@@ -5,4 +5,4 @@
* 仓储服务 * 仓储服务
* 1. 定义仓储接口,之后由基础设施层做具体实现 * 1. 定义仓储接口,之后由基础设施层做具体实现
*/ */
package ${package}.domain.xxx.repository; package ${package}.domain.xxx.adapter.repository;
\ No newline at end of file \ No newline at end of file
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
/**
* 实现对外部的api调用,类的名称为 XxxPort 接口定义在 domain 中
*/
package ${package}.infrastructure.adapter.port;
\ No newline at end of file
...@@ -4,4 +4,4 @@ ...@@ -4,4 +4,4 @@
/** /**
* 仓储实现;用于实现 domain 中定义的仓储接口,如;IXxxRepository 在 Repository 中调用服务 * 仓储实现;用于实现 domain 中定义的仓储接口,如;IXxxRepository 在 Repository 中调用服务
*/ */
package ${package}.infrastructure.persistent.repository; package ${package}.infrastructure.adapter.repository;
\ No newline at end of file \ No newline at end of file
...@@ -4,4 +4,4 @@ ...@@ -4,4 +4,4 @@
/** /**
* DAO 接口;IXxxDao * DAO 接口;IXxxDao
*/ */
package ${package}.infrastructure.persistent.dao; package ${package}.infrastructure.dao;
\ No newline at end of file \ No newline at end of file
...@@ -4,4 +4,4 @@ ...@@ -4,4 +4,4 @@
/** /**
* 持久化对象;XxxPO 最后的 PO 是大写,UserPO * 持久化对象;XxxPO 最后的 PO 是大写,UserPO
*/ */
package ${package}.infrastructure.persistent.po; package ${package}.infrastructure.dao.po;
\ No newline at end of file \ No newline at end of file
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.infrastructure.gateway.dto;
\ No newline at end of file
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
#set( $symbol_dollar = '$' ) #set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' ) #set( $symbol_escape = '\' )
/** /**
* 仓储服务 * 定义http、rpc接口,调用外部。在 adapter 中调用这部分内容。
* 1. 定义仓储接口,之后由基础设施层做具体实现
*/ */
package ${package}.domain.yyy.repository; package ${package}.infrastructure.gateway;
\ No newline at end of file \ No newline at end of file
#set( $symbol_pound = '#' ) #set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' ) #set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' ) #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
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
<packaging>pom</packaging> <packaging>pom</packaging>
<modules> <modules>
<module>${rootArtifactId}-api</module>
<module>${rootArtifactId}-app</module> <module>${rootArtifactId}-app</module>
<module>${rootArtifactId}-domain</module> <module>${rootArtifactId}-domain</module>
<module>${rootArtifactId}-trigger</module> <module>${rootArtifactId}-trigger</module>
......
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>cn.bugstack</groupId>
<artifactId>xfg-frame-archetype-lite</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>xfg-frame-archetype-lite-api</artifactId>
<dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.26</version>
</dependency>
<dependency>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
<version>3.0.2</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
/**
* 数据传输对象 xxxRequestDTO xxxResponseDTO
*/
package cn.bugstack.api.dto;
\ No newline at end of file
/**
* 定义api接口
*/
package cn.bugstack.api;
\ No newline at end of file
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<T> implements Serializable {
private static final long serialVersionUID = 7000723935764546321L;
private String code;
private String info;
private T data;
}
...@@ -12,6 +12,6 @@ ENV TZ=PRC ...@@ -12,6 +12,6 @@ ENV TZ=PRC
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone 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"] ENTRYPOINT ["sh","-c","java -jar $JAVA_OPTS /xfg-frame-archetype-lite-app.jar $PARAMS"]
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.bugstack.infrastructure.persistent.dao.Xxx"> <mapper namespace="cn.bugstack.infrastructure.redis.dao.Xxx">
<resultMap id="CaseMap" type="cn.bugstack.infrastructure.persistent.po.A"> <resultMap id="CaseMap" type="cn.bugstack.infrastructure.redis.po.A">
<id column="id" property="id"/> <id column="id" property="id"/>
<result column="create_time" property="createTime"/> <result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/> <result column="update_time" property="updateTime"/>
</resultMap> </resultMap>
<insert id="insert" parameterType="cn.bugstack.infrastructure.persistent.po.A"> <insert id="insert" parameterType="cn.bugstack.infrastructure.redis.po.A">
INSERT INTO table(a,b,c) VALUES(#{a}, #{b}, #{c}) INSERT INTO table(a,b,c) VALUES(#{a}, #{b}, #{c})
</insert> </insert>
<update id="update" parameterType="cn.bugstack.infrastructure.persistent.po.A"> <update id="update" parameterType="cn.bugstack.infrastructure.redis.po.A">
UPDATE table SET a = #{a} WHERE b = #{b} UPDATE table SET a = #{a} WHERE b = #{b}
</update> </update>
......
/** /**
* 外部接口适配器层;当需要调用外部接口时,则创建出这一层,并定义接口,之后由基础设施层的 adapter 层具体实现 * 外部接口适配器层;当需要调用外部接口时,则创建出这一层,并定义接口,之后由基础设施层的 adapter 层具体实现
*/ */
package cn.bugstack.domain.xxx.adapter; package cn.bugstack.domain.xxx.adapter.port;
\ No newline at end of file \ No newline at end of file
...@@ -2,4 +2,4 @@ ...@@ -2,4 +2,4 @@
* 仓储服务 * 仓储服务
* 1. 定义仓储接口,之后由基础设施层做具体实现 * 1. 定义仓储接口,之后由基础设施层做具体实现
*/ */
package cn.bugstack.domain.xxx.repository; package cn.bugstack.domain.xxx.adapter.repository;
\ No newline at end of file \ No newline at end of file
/**
* 实现对外部的api调用,类的名称为 XxxPort 接口定义在 domain 中
*/
package cn.bugstack.infrastructure.adapter.port;
\ No newline at end of file
/** /**
* 仓储实现;用于实现 domain 中定义的仓储接口,如;IXxxRepository 在 Repository 中调用服务 * 仓储实现;用于实现 domain 中定义的仓储接口,如;IXxxRepository 在 Repository 中调用服务
*/ */
package cn.bugstack.infrastructure.persistent.repository; package cn.bugstack.infrastructure.adapter.repository;
\ No newline at end of file \ No newline at end of file
/** /**
* DAO 接口;IXxxDao * DAO 接口;IXxxDao
*/ */
package cn.bugstack.infrastructure.persistent.dao; package cn.bugstack.infrastructure.dao;
\ No newline at end of file \ No newline at end of file
/** /**
* 持久化对象;XxxPO 最后的 PO 是大写,UserPO * 持久化对象;XxxPO 最后的 PO 是大写,UserPO
*/ */
package cn.bugstack.infrastructure.persistent.po; package cn.bugstack.infrastructure.dao.po;
\ No newline at end of file \ No newline at end of file
/**
* 定义http、rpc接口,调用外部。在 adapter 中调用这部分内容。
*/
package cn.bugstack.infrastructure.gateway;
\ No newline at end of file
/**
* 提供redis链接配置
*/
package cn.bugstack.infrastructure.redis;
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册