把-server项目改为jar包,新增 server-app项目作为启动器 http://172.16.46.63:31560/index.php?m=task&f=view&taskID=699

This commit is contained in:
ranke
2026-01-12 18:36:39 +08:00
parent 041a89bb59
commit 6644710fe0
42 changed files with 257 additions and 108 deletions

View File

@@ -10,6 +10,7 @@
<modules> <modules>
<module>zt-module-databus-api</module> <module>zt-module-databus-api</module>
<module>zt-module-databus-server</module> <module>zt-module-databus-server</module>
<module>zt-module-databus-server-app</module>
</modules> </modules>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@@ -0,0 +1,48 @@
<?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>
<artifactId>zt-module-databus</artifactId>
<groupId>com.zt.plat</groupId>
<version>${revision}</version>
</parent>
<artifactId>zt-module-databus-server-app</artifactId>
<packaging>jar</packaging>
<name>${project.artifactId}</name>
<description>
Databus 模块启动器。
</description>
<dependencies>
<dependency>
<groupId>com.zt.plat</groupId>
<artifactId>zt-module-databus-server</artifactId>
<version>${revision}</version>
</dependency>
</dependencies>
<build>
<!-- 设置构建的 jar 包名 -->
<finalName>${project.artifactId}</finalName>
<plugins>
<!-- 打包 -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring.boot.version}</version>
<executions>
<execution>
<goals>
<goal>repackage</goal> <!-- 将引入的 jar 打入其中 -->
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@@ -192,24 +192,4 @@
</dependency> </dependency>
</dependencies> </dependencies>
<build>
<!-- 设置构建的 jar 包名 -->
<finalName>${project.artifactId}</finalName>
<plugins>
<!-- 打包 -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring.boot.version}</version>
<executions>
<execution>
<goals>
<goal>repackage</goal> <!-- 将引入的 jar 打入其中 -->
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project> </project>

View File

@@ -11,6 +11,7 @@
<modules> <modules>
<module>zt-module-infra-api</module> <module>zt-module-infra-api</module>
<module>zt-module-infra-server</module> <module>zt-module-infra-server</module>
<module>zt-module-infra-server-app</module>
</modules> </modules>
<artifactId>zt-module-infra</artifactId> <artifactId>zt-module-infra</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>

View File

@@ -3,10 +3,10 @@
FROM 172.16.46.66:10043/base-service/eclipse-temurin:21-jre FROM 172.16.46.66:10043/base-service/eclipse-temurin:21-jre
## 创建目录,并使用它作为工作目录 ## 创建目录,并使用它作为工作目录
RUN mkdir -p /zt-module-infra-server RUN mkdir -p /zt-module-infra-server-app
WORKDIR /zt-module-infra-server WORKDIR /zt-module-infra-server-app
## 将后端项目的 Jar 文件,复制到镜像中 ## 将后端项目的 Jar 文件,复制到镜像中
COPY ./target/zt-module-infra-server.jar app.jar COPY ../zt-module-infra-server/target/zt-module-infra-server-app.jar app.jar
## 设置 TZ 时区 ## 设置 TZ 时区
## 设置 JAVA_OPTS 环境变量,可通过 docker run -e "JAVA_OPTS=" 进行覆盖 ## 设置 JAVA_OPTS 环境变量,可通过 docker run -e "JAVA_OPTS=" 进行覆盖

View File

@@ -0,0 +1,48 @@
<?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>
<artifactId>zt-module-infra</artifactId>
<groupId>com.zt.plat</groupId>
<version>${revision}</version>
</parent>
<artifactId>zt-module-infra-server-app</artifactId>
<packaging>jar</packaging>
<name>${project.artifactId}</name>
<description>
infra 模块启动器。
</description>
<dependencies>
<dependency>
<groupId>com.zt.plat</groupId>
<artifactId>zt-module-infra-server</artifactId>
<version>${revision}</version>
</dependency>
</dependencies>
<build>
<!-- 设置构建的 jar 包名 -->
<finalName>${project.artifactId}</finalName>
<plugins>
<!-- 打包 -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring.boot.version}</version>
<executions>
<execution>
<goals>
<goal>repackage</goal> <!-- 将引入的 jar 打入其中 -->
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@@ -149,24 +149,5 @@
</dependency> </dependency>
</dependencies> </dependencies>
<build>
<!-- 设置构建的 jar 包名 -->
<finalName>${project.artifactId}</finalName>
<plugins>
<!-- 打包 -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring.boot.version}</version>
<executions>
<execution>
<goals>
<goal>repackage</goal> <!-- 将引入的 jar 打入其中 -->
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project> </project>

View File

@@ -11,6 +11,7 @@
<modules> <modules>
<module>zt-module-report-api</module> <module>zt-module-report-api</module>
<module>zt-module-report-server</module> <module>zt-module-report-server</module>
<module>zt-module-report-server-app</module>
</modules> </modules>
<artifactId>zt-module-report</artifactId> <artifactId>zt-module-report</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>

View File

@@ -3,10 +3,10 @@
FROM 172.16.46.66:10043/base-service/eclipse-temurin:21-jre FROM 172.16.46.66:10043/base-service/eclipse-temurin:21-jre
## 创建目录,并使用它作为工作目录 ## 创建目录,并使用它作为工作目录
RUN mkdir -p /zt-module-report-server RUN mkdir -p /zt-module-report-server-app
WORKDIR /zt-module-report-server WORKDIR /zt-module-report-server-app
## 将后端项目的 Jar 文件,复制到镜像中 ## 将后端项目的 Jar 文件,复制到镜像中
COPY ./target/zt-module-report-server.jar app.jar COPY ../zt-module-report-server/target/zt-module-report-server-app.jar app.jar
## 设置 TZ 时区 ## 设置 TZ 时区
## 设置 JAVA_OPTS 环境变量,可通过 docker run -e "JAVA_OPTS=" 进行覆盖 ## 设置 JAVA_OPTS 环境变量,可通过 docker run -e "JAVA_OPTS=" 进行覆盖

View File

@@ -0,0 +1,48 @@
<?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>
<artifactId>zt-module-report</artifactId>
<groupId>com.zt.plat</groupId>
<version>${revision}</version>
</parent>
<artifactId>zt-module-report-server-app</artifactId>
<packaging>jar</packaging>
<name>${project.artifactId}</name>
<description>
report 模块启动器。
</description>
<dependencies>
<dependency>
<groupId>com.zt.plat</groupId>
<artifactId>zt-module-report-server</artifactId>
<version>${revision}</version>
</dependency>
</dependencies>
<build>
<!-- 设置构建的 jar 包名 -->
<finalName>${project.artifactId}</finalName>
<plugins>
<!-- 打包 -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring.boot.version}</version>
<executions>
<execution>
<goals>
<goal>repackage</goal> <!-- 将引入的 jar 打入其中 -->
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@@ -111,23 +111,4 @@
</dependency> </dependency>
</dependencies> </dependencies>
<build>
<!-- 设置构建的 jar 包名 -->
<finalName>${project.artifactId}</finalName>
<plugins>
<!-- 打包 -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring.boot.version}</version>
<executions>
<execution>
<goals>
<goal>repackage</goal> <!-- 将引入的 jar 打入其中 -->
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project> </project>

View File

@@ -11,6 +11,7 @@
<modules> <modules>
<module>zt-module-system-api</module> <module>zt-module-system-api</module>
<module>zt-module-system-server</module> <module>zt-module-system-server</module>
<module>zt-module-system-server-app</module>
</modules> </modules>
<artifactId>zt-module-system</artifactId> <artifactId>zt-module-system</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>

View File

@@ -3,10 +3,10 @@
FROM 172.16.46.66:10043/base-service/eclipse-temurin:21-jre FROM 172.16.46.66:10043/base-service/eclipse-temurin:21-jre
## 创建目录,并使用它作为工作目录 ## 创建目录,并使用它作为工作目录
RUN mkdir -p /zt-module-system-server RUN mkdir -p /zt-module-system-server-app
WORKDIR /zt-module-system-server WORKDIR /zt-module-system-server-app
## 将后端项目的 Jar 文件,复制到镜像中 ## 将后端项目的 Jar 文件,复制到镜像中
COPY ./target/zt-module-system-server.jar app.jar COPY ../zt-module-system-server/target/zt-module-system-server-app.jar app.jar
## 设置 TZ 时区 ## 设置 TZ 时区
## 设置 JAVA_OPTS 环境变量,可通过 docker run -e "JAVA_OPTS=" 进行覆盖 ## 设置 JAVA_OPTS 环境变量,可通过 docker run -e "JAVA_OPTS=" 进行覆盖

View File

@@ -0,0 +1,48 @@
<?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>
<artifactId>zt-module-system</artifactId>
<groupId>com.zt.plat</groupId>
<version>${revision}</version>
</parent>
<artifactId>zt-module-system-server-app</artifactId>
<packaging>jar</packaging>
<name>${project.artifactId}</name>
<description>
system 模块启动器。
</description>
<dependencies>
<dependency>
<groupId>com.zt.plat</groupId>
<artifactId>zt-module-system-server</artifactId>
<version>${revision}</version>
</dependency>
</dependencies>
<build>
<!-- 设置构建的 jar 包名 -->
<finalName>${project.artifactId}</finalName>
<plugins>
<!-- 打包 -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring.boot.version}</version>
<executions>
<execution>
<goals>
<goal>repackage</goal> <!-- 将引入的 jar 打入其中 -->
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@@ -193,24 +193,5 @@
</dependencies> </dependencies>
<build>
<!-- 设置构建的 jar 包名 -->
<finalName>${project.artifactId}</finalName>
<plugins>
<!-- 打包 -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring.boot.version}</version>
<executions>
<execution>
<goals>
<goal>repackage</goal> <!-- 将引入的 jar 打入其中 -->
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project> </project>

View File

@@ -10,6 +10,7 @@
<modules> <modules>
<module>zt-module-template-api</module> <module>zt-module-template-api</module>
<module>zt-module-template-server</module> <module>zt-module-template-server</module>
<module>zt-module-template-server-app</module>
</modules> </modules>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@@ -3,10 +3,10 @@
FROM 172.16.46.66:10043/base-service/eclipse-temurin:21-jre FROM 172.16.46.66:10043/base-service/eclipse-temurin:21-jre
## 创建目录,并使用它作为工作目录 ## 创建目录,并使用它作为工作目录
RUN mkdir -p /zt-module-template-server RUN mkdir -p /zt-module-template-server-app
WORKDIR /zt-module-template-server WORKDIR /zt-module-template-server-app
## 将后端项目的 Jar 文件,复制到镜像中 ## 将后端项目的 Jar 文件,复制到镜像中
COPY ./target/zt-module-template-server.jar app.jar COPY ../zt-module-template-server/target/zt-module-template-server-app.jar app.jar
## 设置 TZ 时区 ## 设置 TZ 时区
## 设置 JAVA_OPTS 环境变量,可通过 docker run -e "JAVA_OPTS=" 进行覆盖 ## 设置 JAVA_OPTS 环境变量,可通过 docker run -e "JAVA_OPTS=" 进行覆盖

View File

@@ -0,0 +1,48 @@
<?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>
<artifactId>zt-module-template</artifactId>
<groupId>com.zt.plat</groupId>
<version>${revision}</version>
</parent>
<artifactId>zt-module-template-server-app</artifactId>
<packaging>jar</packaging>
<name>${project.artifactId}</name>
<description>
template 模块启动器。
</description>
<dependencies>
<dependency>
<groupId>com.zt.plat</groupId>
<artifactId>zt-module-template-server</artifactId>
<version>${revision}</version>
</dependency>
</dependencies>
<build>
<!-- 设置构建的 jar 包名 -->
<finalName>${project.artifactId}</finalName>
<plugins>
<!-- 打包 -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring.boot.version}</version>
<executions>
<execution>
<goals>
<goal>repackage</goal> <!-- 将引入的 jar 打入其中 -->
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@@ -134,23 +134,4 @@
</dependency> </dependency>
</dependencies> </dependencies>
<build>
<!-- 设置构建的 jar 包名 -->
<finalName>${project.artifactId}</finalName>
<plugins>
<!-- 打包 -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring.boot.version}</version>
<executions>
<execution>
<goals>
<goal>repackage</goal> <!-- 将引入的 jar 打入其中 -->
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project> </project>