Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion sofaboot-samples/dynamic-stock/biz1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
<bizName>biz1</bizName>
<webContextPath>provider</webContextPath>
<declaredMode>true</declaredMode>
<packExcludesConfig>rules.txt</packExcludesConfig>
</configuration>
</plugin>
</plugins>
Expand Down
1 change: 0 additions & 1 deletion sofaboot4-samples/dynamic-stock/biz1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
<bizName>biz1</bizName>
<webContextPath>provider</webContextPath>
<declaredMode>true</declaredMode>
<packExcludesConfig>rules.txt</packExcludesConfig>
</configuration>
</plugin>
</plugins>
Expand Down
3 changes: 1 addition & 2 deletions springboot-samples/cache/ehcache/README-zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,10 @@ biz1 是普通 springboot 应用,修改打包插件方式为 sofaArk biz 模
<!-- 单host下需更换 web context path -->
<webContextPath>${bizName}</webContextPath>
<declaredMode>true</declaredMode>
<packExcludesConfig>rules.txt</packExcludesConfig>
</configuration>
</plugin>
```
注意这里通过引入 rules.txt 来完成模块自动瘦身,其中包括 ehcache 的依赖也会自动委托给基座加载。另外也需将不同 biz 的web context path 修改成不同的值,以此才能成功在一个 tomcat host 里安装多个 web 应用。
注意这里通过配置 conf/ark/bootstrap.properties 或 conf/ark/bootstrap.yml 来完成模块自动瘦身,其中包括 ehcache 的依赖也会自动委托给基座加载。另外也需将不同 biz 的web context path 修改成不同的值,以此才能成功在一个 tomcat host 里安装多个 web 应用。

### biz2
同 biz1
Expand Down
3 changes: 1 addition & 2 deletions springboot-samples/cache/ehcache/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,10 @@ The biz contains module biz1, which are regular SpringBoot. The packaging plugin
<!-- single host mode, need to change web context path -->
<webContextPath>${bizName}</webContextPath>
<declaredMode>true</declaredMode>
<packExcludesConfig>rules.txt</packExcludesConfig>
</configuration>
</plugin>
```
Note that here by introducing rules.txt to complete the automatic slimming of the module, including the dependency of ehcache will also be automatically delegated to the base for loading. Also, you need to change the web context path of different biz to different values, so that multiple web applications can be successfully installed in a tomcat host.
Note that here by introducing conf/ark/bootstrap.properties or conf/ark/bootstrap.yml to complete the automatic slimming of the module, including the dependency of ehcache will also be automatically delegated to the base for loading. Also, you need to change the web context path of different biz to different values, so that multiple web applications can be successfully installed in a tomcat host.

### biz2
same as biz1
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
excludeArtifactIds=commons-collections,commons-httpclient,commons-io,commons-lang
excludeGroupIds=aopalliance*,asm*,cglib*,com.alibaba.common.lang*,com.alibaba.common.resourcebundle*,\
com.alibaba.tbase*,com.alipay*,com.antcloud.antvip*,com.caucho.hessian*,com.caucho*,com.ctc.wstx*,\
com.fasterxml*,com.google.code*,com.google.common*,com.google.gson*,com.google.guava*,\
com.google.http-client*,com.google.inject*,com.google.protobuf*,com.ibatis*,com.iwallet.biz*,\
com.lmax*,com.taobao.config*,com.taobao.hsf*,com.taobao.notify*,com.taobao.remoting*,\
com.taobao.tair*,groovy*,io.fury*,io.grpc*,io.mosn.layotto*,io.netty*,io.openmessaging*,\
io.prometheus*,javax*,javax.el*,javax.script*,javax.servlet*,javax.validation*,loccs-bcprov*,\
log4j*,mysql*,net.sf.acegisecurity*,net.sf.cglib*,netty*,ognl*,org.aopalliance*,org.apache*,\
org.aspectj*,org.codehaus*,org.codehaus.groovy*,org.codehaus.xfire*,org.dom4j*,\
org.hibernate.validator*,org.junit*,org.mvel2*,org.mybatis*,org.mybatis.spring*,\
org.mybatis.spring.boot.autoconfigure*,org.projectlombok*,org.quartz*,org.reflections*,\
org.slf4j*,org.springframework*,org.yaml*,xerces*,xml-apis*,xpp3*,jakarta*,\
org.latencyutils*,org.hdrhistogram*,io.micrometer*,ch.qos.logback*,com.squareup.okhttp3*,\
com.squareup.okhttp*,net.sf.ehcache*,redis.clients*
82 changes: 0 additions & 82 deletions springboot-samples/cache/ehcache/biz1-ehcache/conf/ark/rules.txt

This file was deleted.

1 change: 0 additions & 1 deletion springboot-samples/cache/ehcache/biz1-ehcache/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
<!-- 单host下需更换 web context path -->
<webContextPath>biz1</webContextPath>
<declaredMode>true</declaredMode>
<packExcludesConfig>rules.txt</packExcludesConfig>
</configuration>
</plugin>
</plugins>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
excludeArtifactIds=commons-collections,commons-httpclient,commons-io,commons-lang
excludeGroupIds=aopalliance*,asm*,cglib*,com.alibaba.common.lang*,com.alibaba.common.resourcebundle*,\
com.alibaba.tbase*,com.alipay*,com.antcloud.antvip*,com.caucho.hessian*,com.caucho*,com.ctc.wstx*,\
com.fasterxml*,com.google.code*,com.google.common*,com.google.gson*,com.google.guava*,\
com.google.http-client*,com.google.inject*,com.google.protobuf*,com.ibatis*,com.iwallet.biz*,\
com.lmax*,com.taobao.config*,com.taobao.hsf*,com.taobao.notify*,com.taobao.remoting*,\
com.taobao.tair*,groovy*,io.fury*,io.grpc*,io.mosn.layotto*,io.netty*,io.openmessaging*,\
io.prometheus*,javax*,javax.el*,javax.script*,javax.servlet*,javax.validation*,loccs-bcprov*,\
log4j*,mysql*,net.sf.acegisecurity*,net.sf.cglib*,netty*,ognl*,org.aopalliance*,org.apache*,\
org.aspectj*,org.codehaus*,org.codehaus.groovy*,org.codehaus.xfire*,org.dom4j*,\
org.hibernate.validator*,org.junit*,org.mvel2*,org.mybatis*,org.mybatis.spring*,\
org.mybatis.spring.boot.autoconfigure*,org.projectlombok*,org.quartz*,org.reflections*,\
org.slf4j*,org.springframework*,org.yaml*,xerces*,xml-apis*,xpp3*,jakarta*,\
org.latencyutils*,org.hdrhistogram*,io.micrometer*,ch.qos.logback*,com.squareup.okhttp3*,\
com.squareup.okhttp*,net.sf.ehcache*,redis.clients*
82 changes: 0 additions & 82 deletions springboot-samples/cache/ehcache/biz2-ehcache/conf/ark/rules.txt

This file was deleted.

1 change: 0 additions & 1 deletion springboot-samples/cache/ehcache/biz2-ehcache/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
<!-- 单host下需更换 web context path -->
<webContextPath>biz2</webContextPath>
<declaredMode>true</declaredMode>
<packExcludesConfig>rules.txt</packExcludesConfig>
</configuration>
</plugin>
</plugins>
Expand Down
2 changes: 1 addition & 1 deletion springboot-samples/cache/redis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ The biz is built form regular SpringBoot application. The only change you need t
</configuration>
</plugin>
```
Note that here by introducing rules.txt to complete the automatic slimming of the module, including the dependency of ehcache will also be automatically delegated to the base for loading. Also, you need to change the web context path of different biz to different values, so that multiple web applications can be successfully installed in a tomcat host.
Note that here by introducing conf/ark/bootstrap.properties or conf/ark/bootstrap.yml to complete the automatic slimming of the module, including the dependency of ehcache will also be automatically delegated to the base for loading. Also, you need to change the web context path of different biz to different values, so that multiple web applications can be successfully installed in a tomcat host.

## Experiment Steps
### Install Redis locally and start it
Expand Down
2 changes: 1 addition & 1 deletion springboot-samples/config/apollo/README-zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@ docker-compose up
7. 执行 `curl http://localhost:8081/biz2/getValue` 获取到 biz2 的配置值,修改 biz2 的 data.name,再次执行 `curl http://localhost:8081/biz2/getValue` 能获取到新的 biz2 的配置值,也不会影响 biz1 或基座的配置值

### 不同模块使用相同 app id,独立配置默认就已经支持
模块统一使用[自动排包能力](https://koupleless.gitee.io/docs/tutorials/module-development/module-slimming/#%E4%B8%80%E9%94%AE%E8%87%AA%E5%8A%A8%E7%98%A6%E8%BA%AB),在 rules.txt 文件里确保有这个配置 `excludeGroupIds=com.ctrip.framework.apollo*`,将 apollo client 委托给基座加载即可达到效果。
模块统一使用[自动排包能力](https://koupleless.gitee.io/docs/tutorials/module-development/module-slimming/#%E4%B8%80%E9%94%AE%E8%87%AA%E5%8A%A8%E7%98%A6%E8%BA%AB),在 conf/ark/bootstrap.properties 或 conf/ark/bootstrap.yml 文件里确保有这个配置 `excludeGroupIds=com.ctrip.framework.apollo*`,将 apollo client 委托给基座加载即可达到效果。
注意 application.properties 里增加 `spring.jmx.default-domain=${spring.application.name}`
2 changes: 1 addition & 1 deletion springboot-samples/config/apollo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ docker-compose up
7. run `curl http://localhost:8081/biz2/getValue` to get biz2 config value, modify biz2 data.name, and run `curl http://localhost:8081/biz2/getValue` again to get new biz2 config value

### using same app id for different modules, independent configuration
using [automatic slimming](https://koupleless.gitee.io/docs/tutorials/module-development/module-slimming/#%E4%B8%80%E9%94%AE%E8%87%AA%E5%8A%A8%E7%98%A6%E8%BA%AB) to delegate apollo client to base, add `excludeGroupIds=com.ctrip.framework.apollo*` in rules.txt to make sure apollo client is delegated to base.
using [automatic slimming](https://koupleless.gitee.io/docs/tutorials/module-development/module-slimming/#%E4%B8%80%E9%94%AE%E8%87%AA%E5%8A%A8%E7%98%A6%E8%BA%AB) to delegate apollo client to base, add `excludeGroupIds=com.ctrip.framework.apollo*` in conf/ark/bootstrap.properties or conf/ark/bootstrap.yml to make sure apollo client is delegated to base.

Please notice that add `spring.jmx.default-domain=${spring.application.name}` in application.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
excludeArtifactIds=commons-collections,commons-httpclient,commons-io,commons-lang,fastjson
excludeGroupIds=aopalliance*,asm*,cglib*,com.alibaba.common.lang*,com.alibaba.common.resourcebundle*,\
com.alibaba.tbase*,com.alipay*,com.antcloud.antvip*,com.caucho.hessian*,com.caucho*,com.ctc.wstx*,\
com.fasterxml*,com.google.code*,com.google.common*,com.google.gson*,com.google.guava*,com.google.j2objc*,\
com.google.http-client*,com.google.inject*,com.google.protobuf*,com.ibatis*,com.iwallet.biz*,com.lmax*,\
com.taobao.config*,com.taobao.hsf*,com.taobao.notify*,com.taobao.remoting*,com.taobao.tair*,groovy*,io.fury*,io.grpc*,\
io.mosn.layotto*,io.netty*,io.openmessaging*,io.prometheus*,javax*,javax.el*,javax.script*,javax.servlet*,javax.validation*,\
loccs-bcprov*,log4j*,mysql*,net.sf.acegisecurity*,net.sf.cglib*,netty*,ognl*,org.aopalliance*,org.apache*,org.aspectj*,\
org.codehaus*,org.codehaus.groovy*,org.codehaus.xfire*,org.dom4j*,org.hibernate.validator*,org.junit*,org.mvel2*,org.mybatis*,\
org.mybatis.spring*,org.mybatis.spring.boot.autoconfigure*,org.projectlombok*,org.quartz*,org.reflections*,org.slf4j*,\
org.springframework*,org.yaml*,xerces*,xml-apis*,xpp3*,jakarta*,org.latencyutils*,org.hdrhistogram*,io.micrometer*,\
ch.qos.logback*,com.squareup.okhttp3*,com.squareup.okhttp*,net.sf.ehcache*,redis.clients*,net.bytebuddy*,com.taobao.text*,\
net.java.dev.jna*,com.google.errorprone*,com.github.oshi*,org.checkerframework*
92 changes: 0 additions & 92 deletions springboot-samples/config/apollo/biz1-apollo/conf/ark/rules.txt

This file was deleted.

1 change: 0 additions & 1 deletion springboot-samples/config/apollo/biz1-apollo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@
<bizName>biz1-apollo</bizName>
<webContextPath>biz1</webContextPath>
<declaredMode>true</declaredMode>
<packExcludesConfig>rules.txt</packExcludesConfig>
<!-- 打包、安装和发布 ark biz-->
<!-- 静态合并部署需要配置-->
<!-- <attach>true</attach>-->
Expand Down
Loading