Compare commits

...

24 Commits

Author SHA1 Message Date
oyo
ed184c22c0 增加sources.jar 2026-06-16 18:06:58 +08:00
oyo
9b1f22cb82 dist打包修改 2026-06-16 18:06:58 +08:00
oyo
7623fdd38a 修改为remote_contract 2026-06-16 18:06:58 +08:00
oyo
ce6f75417c 修改dist 2026-06-16 18:06:58 +08:00
oyo
7c379a5ff1 revision 2026-06-16 18:06:58 +08:00
oyo
1c4e34d8a8 修改打包模板 2026-06-16 18:06:58 +08:00
oyo
0eabdb6101 修改为interfaces 2026-06-16 18:06:58 +08:00
oyo
74cbd19a10 修改为interfaces 2026-06-16 18:06:57 +08:00
oyo
14d0755d9f 修改为interfaces 2026-06-16 18:06:57 +08:00
oyo
d3358e424c client模块被根依赖 2026-06-16 18:06:57 +08:00
oyo
055b3983ea client模块被根依赖 2026-06-16 18:06:57 +08:00
oyo
8b9329c841 增加microserviceFrameworkType: ""
microserviceFrameworkVersion: ""
2026-06-16 18:06:57 +08:00
oyo
4f3eacd114 git ignore 2026-06-16 18:06:57 +08:00
oyo
5745f10565 增加微服务配置pom动态化 2026-06-16 18:06:57 +08:00
oyo
43aadbb06b 增加打包内容,包含QueryResult、TocoGenerated、TocoGenerated$LockLevel 2026-06-16 18:06:57 +08:00
oyo
9c24317a18 jar 改为dist 2026-06-16 18:06:57 +08:00
oyo
fa259ce453 jar 改为dist 2026-06-16 18:06:57 +08:00
oyo
2ad767722a 去掉modules 2026-06-16 18:06:57 +08:00
oyo
2caf931a46 facade改为client,增加public-api 2026-06-16 18:06:57 +08:00
oyo
cd55ec8ca0 facade改为client 2026-06-16 18:06:57 +08:00
ycl
fde437b8b9 #支持微服务,添加facade模块用于放置对外的rpc服务 2026-06-16 18:06:57 +08:00
oyo
cc0062434c 升级lombok 2026-06-16 18:06:07 +08:00
oyo
dc8f834942 去掉junit4依赖 2026-06-16 18:05:59 +08:00
ycl
9175d32599 更新 template/pom.xml 2026-06-16 18:05:07 +08:00
11 changed files with 270 additions and 16 deletions

9
.gitignore vendored Normal file
View File

@@ -0,0 +1,9 @@
## IntelliJ IDEA
.idea/
*.iml
## Maven
target/
## System
.DS_Store

3
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,3 @@
{
"java.compile.nullAnalysis.mode": "automatic"
}

11
template/client/pom.xml Normal file
View File

@@ -0,0 +1,11 @@
<?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>{{ .artifactId }}</artifactId>
<version>${revision}</version>
</parent>
<artifactId>{{ .artifactId }}-client</artifactId>
</project>

View File

@@ -20,11 +20,27 @@
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<revision>3.0-SNAPSHOT</revision>
{{- if eq .microserviceFrameworkType "SPRING_CLOUD" }}
<spring.cloud.version>{{ default "2021.0.9" .microserviceFrameworkVersion }}</spring.cloud.version>
{{- end }}
{{- if eq .dbType "dm" }}
<dm.driver.version>18</dm.driver.version>
<db.hiernate.dialect.version>8.1.3.140</db.hiernate.dialect.version>
{{- end }}
</properties>
{{- if eq .microserviceFrameworkType "SPRING_CLOUD" }}
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring.cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
{{- end }}
<dependencies>
<dependency>
<groupId>cn.hutool</groupId>
@@ -36,12 +52,6 @@
<artifactId>javax.persistence-api</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
@@ -158,15 +168,10 @@
<artifactId>javax.annotation-api</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.7.4</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.20</version>
<version>1.18.46</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
@@ -198,7 +203,7 @@
<dependency>
<groupId>io.github.think-1024</groupId>
<artifactId>toco-all-spring5-springboot2-community</artifactId>
<version>2.0</version>
<version>2.2</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
@@ -231,6 +236,13 @@
<artifactId>transmittable-thread-local</artifactId>
<version>2.12.3</version>
</dependency>
{{- if and (eq .microserviceFrameworkType "DUBBO") .microserviceFrameworkVersion }}
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-starter</artifactId>
<version>{{ .microserviceFrameworkVersion }}</version>
</dependency>
{{- end }}
{{- if eq .dbType "dm" }}
<dependency>
<groupId>dm</groupId>
@@ -306,8 +318,11 @@
</plugins>
</build>
<modules>
<module>remote_contract/types</module>
<module>remote_contract/interfaces</module>
<module>public_service</module>
<module>entrance</module>
<module>common</module>
<module>public_service</module>
<module>client</module>
</modules>
</project>

View File

@@ -8,4 +8,12 @@
<version>${revision}</version>
</parent>
<artifactId>{{ .artifactId }}-public-service</artifactId>
<dependencies>
<dependency>
<groupId>{{ .groupId }}</groupId>
<artifactId>{{ .artifactId }}-remote-contract-types</artifactId>
<version>${revision}</version>
</dependency>
</dependencies>
</project>

113
template/remote_contract/dist/pom.xml vendored Normal file
View File

@@ -0,0 +1,113 @@
<?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>
<groupId>{{ .groupId }}</groupId>
<artifactId>{{ .artifactId }}-api</artifactId>
<version>3.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>{{ .groupId }}</groupId>
<artifactId>{{ .artifactId }}-remote-contract-interfaces</artifactId>
<version>3.0-SNAPSHOT</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>{{ .groupId }}</groupId>
<artifactId>{{ .artifactId }}-remote-contract-types</artifactId>
<version>3.0-SNAPSHOT</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>io.github.think-1024</groupId>
<artifactId>toco-all-spring5-springboot2-community</artifactId>
<version>2.0</version>
<optional>true</optional>
</dependency>
</dependencies>
<build>
<finalName>{{ .artifactId }}-api</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<includes>
<include>{{ .groupId }}:{{ .artifactId }}-remote-contract-interfaces</include>
<include>{{ .groupId }}:{{ .artifactId }}-remote-contract-types</include>
<include>io.github.think-1024:toco-all-spring5-springboot2-community</include>
</includes>
</artifactSet>
<filters>
<filter>
<artifact>io.github.think-1024:toco-all-spring5-springboot2-community</artifact>
<includes>
<include>com/vs/query/QueryResult.class</include>
<include>com/vs/code/TocoGenerated.class</include>
<include>com/vs/code/TocoGenerated$LockLevel.class</include>
</includes>
</filter>
</filters>
<shadedArtifactAttached>false</shadedArtifactAttached>
<createDependencyReducedPom>false</createDependencyReducedPom>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<id>copy-api-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/api-sources</outputDirectory>
<resources>
<resource>
<directory>${project.basedir}/../types/src/main/java</directory>
</resource>
<resource>
<directory>${project.basedir}/../interfaces/src/main/java</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>attach-api-sources</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classesDirectory>${project.build.directory}/api-sources</classesDirectory>
<classifier>sources</classifier>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@@ -0,0 +1,20 @@
<?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>{{ .artifactId }}-remote-contract</artifactId>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>{{ .artifactId }}-remote-contract-interfaces</artifactId>
<dependencies>
<dependency>
<groupId>{{ .groupId }}</groupId>
<artifactId>{{ .artifactId }}-remote-contract-types</artifactId>
<version>${revision}</version>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1,61 @@
<?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>
<groupId>{{ .groupId }}</groupId>
<artifactId>{{ .artifactId }}-remote-contract</artifactId>
<version>${revision}</version>
<packaging>pom</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<revision>3.0-SNAPSHOT</revision>
<lombok.version>1.18.20</lombok.version>
<validation-api.version>2.0.1.Final</validation-api.version>
<toco.version>2.0</toco.version>
</properties>
<dependencies>
<dependency>
<groupId>io.github.think-1024</groupId>
<artifactId>toco-all-spring5-springboot2-community</artifactId>
<version>${toco.version}</version>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>${validation-api.version}</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<modules>
<module>types</module>
<module>interfaces</module>
<module>dist</module>
</modules>
</project>

View File

@@ -0,0 +1,12 @@
<?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>{{ .artifactId }}-remote-contract</artifactId>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>{{ .artifactId }}-remote-contract-types</artifactId>
</project>

View File

@@ -6,6 +6,8 @@ version: 1.0-SNAPSHOT
vsVersion: 1.0.0
projectId: 3fdc654b-feb2-4d4a-be19-e9ca2998b5d6
dbType: mysql
microserviceFrameworkType: ""
microserviceFrameworkVersion: ""
dbHost: 10.0.2.201
dbPort: 3306
package: "{{ .groupId }}.{{ .artifactId }}"