mirror of
https://gitee.com/ChinaLym/shoulder-platform.git
synced 2025-12-30 11:02:26 +00:00
feat(archetype): 脚手架部分整理
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
# ${rootArtifactId}
|
# ${rootArtifactId}
|
||||||
|
|
||||||
工程目录结构:
|
## 工程目录结构:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>${artifactId}</artifactId>
|
<artifactId>${artifactId}</artifactId>
|
||||||
|
<description>${artifactId} 接口标准</description>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
<artifactId>${artifactId}</artifactId>
|
<artifactId>${artifactId}</artifactId>
|
||||||
|
|
||||||
<description>共性业务放这里</description>
|
<description>核心业务放这里,本服务的核心业务。</description>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,19 @@
|
|||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Mybatis-Plus -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.baomidou</groupId>
|
||||||
|
<artifactId>mybatis-plus-annotation</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- JPA -->
|
||||||
|
<!--<dependency>
|
||||||
|
<groupId>jakarta.persistence</groupId>
|
||||||
|
<artifactId>jakarta.persistence-api</artifactId>
|
||||||
|
</dependency>-->
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<artifactId>${artifactId}</artifactId>
|
<artifactId>${artifactId}</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<description>基础设施层:存放可能随着 技术发展、部署环境、产品定位 而产生变化的代码,如:数据库在不同环境选型容易更换</description>
|
<description>基础设施层:存放可能随着 技术发展、部署环境、产品定位 而产生变化的代码,如:数据库在不同环境选型容易更换。</description>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
<module>${rootArtifactId}-storage</module>
|
<module>${rootArtifactId}-storage</module>
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
/**
|
|
||||||
* 这里放置 api 包接口的实现
|
|
||||||
*/
|
|
||||||
package ${package}.xxx.controller;
|
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
<artifactId>${artifactId}</artifactId>
|
<artifactId>${artifactId}</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<description>具体业务/子业务 按模块划分</description>
|
<description>具体业务/子业务,按模块划分,这里仅实现业务逻辑,不提供接口,接口由 provider 中提供。</description>
|
||||||
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|||||||
@@ -9,10 +9,17 @@
|
|||||||
|
|
||||||
<artifactId>${artifactId}</artifactId>
|
<artifactId>${artifactId}</artifactId>
|
||||||
|
|
||||||
<description>为外部提供服务,若子业务过多,可拆分为多个 provider,该模块也可合并至具体 module 中</description>
|
<description>为外部提供服务(可选)。若子业务过多,可拆分为多个 provider。若业务简单该模块也可合并至具体 module 中。</description>
|
||||||
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
|
<!-- 接口标准 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>${groupId}</groupId>
|
||||||
|
<artifactId>${rootArtifactId}-api</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- 将业务模块引入 -->
|
<!-- 将业务模块引入 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>${groupId}</groupId>
|
<groupId>${groupId}</groupId>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<artifactId>${artifactId}</artifactId>
|
<artifactId>${artifactId}</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<description>存放调用其他服务的代码</description>
|
<description>存放调用其他服务的代码(可选),若不调用其他模块,删除即可。</description>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
<!-- 外部 api 定义/依赖 -->
|
<!-- 外部 api 定义/依赖 -->
|
||||||
|
|||||||
@@ -27,6 +27,12 @@
|
|||||||
<artifactId>${rootArtifactId}-storage-mysql</artifactId>
|
<artifactId>${rootArtifactId}-storage-mysql</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 默认只提供接口,不含 web 端 -->
|
||||||
|
<!--<dependency>
|
||||||
|
<groupId>${groupId}</groupId>
|
||||||
|
<artifactId>${rootArtifactId}-web</artifactId>
|
||||||
|
</dependency>-->
|
||||||
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ package ${package}.start;
|
|||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ${appId} 启动类
|
* ${appId} 启动类
|
||||||
*
|
*
|
||||||
@@ -19,6 +21,8 @@ public class ${StartClassName} {
|
|||||||
SpringApplication.run(${StartClassName}.class, args);
|
SpringApplication.run(${StartClassName}.class, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ******************* 以下方法仅用于生成 banner,使用后删除即可 **********************
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* shoulder 前缀的彩色启动 banner
|
* shoulder 前缀的彩色启动 banner
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -34,7 +34,9 @@ public class DemoController {
|
|||||||
@GetMapping("test")
|
@GetMapping("test")
|
||||||
public String test() {
|
public String test() {
|
||||||
return "Congratulations on your new project based on <a href='https://github.com/ChinaLym/shoulder-platform'>shoulder-platform</a>!</br></br>" +
|
return "Congratulations on your new project based on <a href='https://github.com/ChinaLym/shoulder-platform'>shoulder-platform</a>!</br></br>" +
|
||||||
"恭喜你成功创建了一个基于<a href='https://github.com/ChinaLym/shoulder-platform'>shoulder-platform</a>的工程!";
|
"恭喜你成功创建了一个基于<a href='https://github.com/ChinaLym/shoulder-platform'>shoulder-platform</a>的工程!" +
|
||||||
|
"shoulder-platform 是借助 <a href='https://github.com/ChinaLym/shoulder-framework'>shoulder-framework</a> 快速开发能力构建的示例平台," +
|
||||||
|
"可以 <a href='https://github.com/ChinaLym/shoulder-framework-demo'>点击这里查看使用案例</a>,以快速了解 Shoulder。";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
<name>${artifactId}</name>
|
<name>${artifactId}</name>
|
||||||
<artifactId>${artifactId}</artifactId>
|
<artifactId>${artifactId}</artifactId>
|
||||||
<description>todo 介绍以下这个工程</description>
|
<description>todo 介绍这个工程</description>
|
||||||
|
|
||||||
<groupId>${groupId}</groupId>
|
<groupId>${groupId}</groupId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|||||||
Reference in New Issue
Block a user