feat(archetype): 脚手架部分整理

This commit is contained in:
15858193327
2020-11-02 02:00:10 +08:00
parent 6fa9d14345
commit ca3161b0f2
13 changed files with 41 additions and 12 deletions

View File

@@ -1,6 +1,6 @@
# ${rootArtifactId}
工程目录结构:
## 工程目录结构:
![目录结构](img/projectAndModule.png)

View File

@@ -8,6 +8,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>${artifactId}</artifactId>
<description>${artifactId} 接口标准</description>
<dependencies>
<dependency>

View File

@@ -9,7 +9,7 @@
<artifactId>${artifactId}</artifactId>
<description>共性业务放这里</description>
<description>核心业务放这里,本服务的核心业务。</description>
<dependencies>

View File

@@ -18,6 +18,19 @@
<scope>provided</scope>
</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>
</project>

View File

@@ -10,7 +10,7 @@
<artifactId>${artifactId}</artifactId>
<packaging>pom</packaging>
<description>基础设施层:存放可能随着 技术发展、部署环境、产品定位 而产生变化的代码,如:数据库在不同环境选型容易更换</description>
<description>基础设施层:存放可能随着 技术发展、部署环境、产品定位 而产生变化的代码,如:数据库在不同环境选型容易更换</description>
<modules>
<module>${rootArtifactId}-storage</module>

View File

@@ -10,7 +10,7 @@
<artifactId>${artifactId}</artifactId>
<packaging>pom</packaging>
<description>具体业务/子业务 按模块划分</description>
<description>具体业务/子业务按模块划分,这里仅实现业务逻辑,不提供接口,接口由 provider 中提供。</description>
<dependencies>

View File

@@ -9,10 +9,17 @@
<artifactId>${artifactId}</artifactId>
<description>为外部提供服务若子业务过多,可拆分为多个 provider该模块也可合并至具体 module 中</description>
<description>为外部提供服务(可选)。若子业务过多,可拆分为多个 provider。若业务简单该模块也可合并至具体 module 中</description>
<dependencies>
<!-- 接口标准 -->
<dependency>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}-api</artifactId>
</dependency>
<!-- 将业务模块引入 -->
<dependency>
<groupId>${groupId}</groupId>

View File

@@ -10,7 +10,7 @@
<artifactId>${artifactId}</artifactId>
<packaging>pom</packaging>
<description>存放调用其他服务的代码</description>
<description>存放调用其他服务的代码(可选),若不调用其他模块,删除即可。</description>
<modules>
<!-- 外部 api 定义/依赖 -->

View File

@@ -27,6 +27,12 @@
<artifactId>${rootArtifactId}-storage-mysql</artifactId>
</dependency>
<!-- 默认只提供接口,不含 web 端 -->
<!--<dependency>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}-web</artifactId>
</dependency>-->
</dependencies>

View File

@@ -6,6 +6,8 @@ package ${package}.start;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import java.util.List;
/**
* ${appId} 启动类
*
@@ -19,6 +21,8 @@ public class ${StartClassName} {
SpringApplication.run(${StartClassName}.class, args);
}
// ******************* 以下方法仅用于生成 banner使用后删除即可 **********************
/**
* shoulder 前缀的彩色启动 banner
*/

View File

@@ -34,7 +34,9 @@ public class DemoController {
@GetMapping("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>" +
"恭喜你成功创建了一个基于<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。";
}

View File

@@ -10,7 +10,7 @@
<name>${artifactId}</name>
<artifactId>${artifactId}</artifactId>
<description>todo 介绍以下这个工程</description>
<description>todo 介绍这个工程</description>
<groupId>${groupId}</groupId>
<packaging>pom</packaging>