Skip to content

Commit d875beb

Browse files
authored
Merge pull request #447 from sofastack/youji-dev
add tips for import base starter
2 parents 17a685e + 374c323 commit d875beb

28 files changed

Lines changed: 131 additions & 19 deletions

File tree

samples/springboot-samples/cache/ehcache/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,13 @@ base 为普通 springboot 改造成的基座,改造内容为在 pom 里增加
1010
```xml
1111

1212
<!-- 这里添加动态模块相关依赖 -->
13+
<!-- 务必将次依赖放在构建 pom 的第一个依赖引入, 并且设置 type= pom,
14+
原理请参考这里 https://sofaserverless.gitee.io/docs/contribution-guidelines/runtime/multi-app-padater/ -->
1315
<dependency>
1416
<groupId>com.alipay.sofa.serverless</groupId>
1517
<artifactId>sofa-serverless-base-starter</artifactId>
18+
<version>${sofa.serverless.runtime.version}</version>
19+
<type>pom</type>
1620
</dependency>
1721
<!-- end 动态模块相关依赖 -->
1822

samples/springboot-samples/cache/ehcache/base/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
<artifactId>base-ehcache</artifactId>
1212
<version>0.0.1-SNAPSHOT</version>
1313
<dependencies>
14+
<!-- 务必将次依赖放在构建 pom 的第一个依赖引入, 并且设置 type= pom,
15+
原理请参考这里 https://sofaserverless.gitee.io/docs/contribution-guidelines/runtime/multi-app-padater/ -->
16+
<!-- must add this dependency as the first one in the pom for building jar, and set type=pom,
17+
check the reason from here https://sofaserverless.gitee.io/docs/contribution-guidelines/runtime/multi-app-padater/ -->
1418
<dependency>
1519
<groupId>com.alipay.sofa.serverless</groupId>
1620
<artifactId>sofa-serverless-base-starter</artifactId>

samples/springboot-samples/cache/redis/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@ base 为普通 springboot 改造成的基座,改造内容为在 pom 里增加
88
```xml
99

1010
<!-- 这里添加动态模块相关依赖 -->
11+
<!-- 务必将次依赖放在构建 pom 的第一个依赖引入, 并且设置 type= pom,
12+
原理请参考这里 https://sofaserverless.gitee.io/docs/contribution-guidelines/runtime/multi-app-padater/ -->
1113
<dependency>
1214
<groupId>com.alipay.sofa.serverless</groupId>
1315
<artifactId>sofa-serverless-base-starter</artifactId>
16+
<version>${sofa.serverless.runtime.version}</version>
17+
<type>pom</type>
1418
</dependency>
1519
<!-- end 动态模块相关依赖 -->
1620

samples/springboot-samples/cache/redis/sample-redis-base/redis-base-bootstrap/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
</properties>
1919

2020
<dependencies>
21+
<!-- 务必将次依赖放在构建 pom 的第一个依赖引入, 并且设置 type= pom,
22+
原理请参考这里 https://sofaserverless.gitee.io/docs/contribution-guidelines/runtime/multi-app-padater/ -->
23+
<!-- must add this dependency as the first one in the pom for building jar, and set type=pom,
24+
check the reason from here https://sofaserverless.gitee.io/docs/contribution-guidelines/runtime/multi-app-padater/ -->
2125
<dependency>
2226
<groupId>com.alipay.sofa.serverless</groupId>
2327
<artifactId>sofa-serverless-base-starter</artifactId>

samples/springboot-samples/config/apollo/base/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
<artifactId>base-apollo</artifactId>
1212
<version>0.0.1-SNAPSHOT</version>
1313
<dependencies>
14+
<!-- 务必将次依赖放在构建 pom 的第一个依赖引入, 并且设置 type= pom,
15+
原理请参考这里 https://sofaserverless.gitee.io/docs/contribution-guidelines/runtime/multi-app-padater/ -->
16+
<!-- must add this dependency as the first one in the pom for building jar, and set type=pom,
17+
check the reason from here https://sofaserverless.gitee.io/docs/contribution-guidelines/runtime/multi-app-padater/ -->
1418
<dependency>
1519
<groupId>com.alipay.sofa.serverless</groupId>
1620
<artifactId>sofa-serverless-base-starter</artifactId>

samples/springboot-samples/config/nacos/base/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
<artifactId>base-nacos</artifactId>
1212
<version>0.0.1-SNAPSHOT</version>
1313
<dependencies>
14+
<!-- 务必将次依赖放在构建 pom 的第一个依赖引入, 并且设置 type= pom,
15+
原理请参考这里 https://sofaserverless.gitee.io/docs/contribution-guidelines/runtime/multi-app-padater/ -->
16+
<!-- must add this dependency as the first one in the pom for building jar, and set type=pom,
17+
check the reason from here https://sofaserverless.gitee.io/docs/contribution-guidelines/runtime/multi-app-padater/ -->
1418
<dependency>
1519
<groupId>com.alipay.sofa.serverless</groupId>
1620
<artifactId>sofa-serverless-base-starter</artifactId>

samples/springboot-samples/db/mongo/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,13 @@ docker run --name mongodb -d -p 27017:27017 -v $(pwd)/data:/data/db ${mongodb_im
1616
base 为普通 springboot 改造成的基座,改造内容为在 pom 里增加如下依赖
1717
```xml
1818
<!-- 这里添加动态模块相关依赖 -->
19+
<!-- 务必将次依赖放在构建 pom 的第一个依赖引入, 并且设置 type= pom,
20+
原理请参考这里 https://sofaserverless.gitee.io/docs/contribution-guidelines/runtime/multi-app-padater/ -->
1921
<dependency>
2022
<groupId>com.alipay.sofa.serverless</groupId>
2123
<artifactId>sofa-serverless-base-starter</artifactId>
24+
<version>${sofa.serverless.runtime.version}</version>
25+
<type>pom</type>
2226
</dependency>
2327
<!-- end 动态模块相关依赖 -->
2428

@@ -265,4 +269,4 @@ curl --location --request GET 'localhost:8080/biz2/listCommons'
265269
```
266270

267271
## 注意事项
268-
这里主要使用简单应用做验证,如果复杂应用,需要注意模块做好瘦身,基座有的依赖,模块尽可能设置成 provided,尽可能使用基座的依赖。
272+
这里主要使用简单应用做验证,如果复杂应用,需要注意模块做好瘦身,基座有的依赖,模块尽可能设置成 provided,尽可能使用基座的依赖。

samples/springboot-samples/db/mongo/base/bootstrap/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
<description>mongo base for mongo</description>
1515

1616
<dependencies>
17+
<!-- 务必将次依赖放在构建 pom 的第一个依赖引入, 并且设置 type= pom,
18+
原理请参考这里 https://sofaserverless.gitee.io/docs/contribution-guidelines/runtime/multi-app-padater/ -->
19+
<!-- must add this dependency as the first one in the pom for building jar, and set type=pom,
20+
check the reason from here https://sofaserverless.gitee.io/docs/contribution-guidelines/runtime/multi-app-padater/ -->
1721
<dependency>
1822
<groupId>com.alipay.sofa.serverless</groupId>
1923
<artifactId>sofa-serverless-base-starter</artifactId>

samples/springboot-samples/db/mybatis/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@
55
base 为普通 springboot 改造成的基座,改造内容为在 pom 里增加如下依赖
66
```xml
77
<!-- 这里添加动态模块相关依赖 -->
8+
<!-- 务必将次依赖放在构建 pom 的第一个依赖引入, 并且设置 type= pom,
9+
原理请参考这里 https://sofaserverless.gitee.io/docs/contribution-guidelines/runtime/multi-app-padater/ -->
810
<dependency>
911
<groupId>com.alipay.sofa.serverless</groupId>
1012
<artifactId>sofa-serverless-base-starter</artifactId>
13+
<version>${sofa.serverless.runtime.version}</version>
14+
<type>pom</type>
1115
</dependency>
1216
<!-- end 动态模块相关依赖 -->
1317

samples/springboot-samples/db/mybatis/base/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515
<description>base for mybatis</description>
1616

1717
<dependencies>
18+
<!-- 务必将次依赖放在构建 pom 的第一个依赖引入, 并且设置 type= pom,
19+
原理请参考这里 https://sofaserverless.gitee.io/docs/contribution-guidelines/runtime/multi-app-padater/ -->
20+
<!-- must add this dependency as the first one in the pom for building jar, and set type=pom,
21+
check the reason from here https://sofaserverless.gitee.io/docs/contribution-guidelines/runtime/multi-app-padater/ -->
1822
<dependency>
1923
<groupId>com.alipay.sofa.serverless</groupId>
2024
<artifactId>sofa-serverless-base-starter</artifactId>

0 commit comments

Comments
 (0)