sofa-serverless icon indicating copy to clipboard operation
sofa-serverless copied to clipboard

优化自动排包的配置方式

Open lvjing2 opened this issue 1 year ago • 3 comments

问题描述

当前使用自动排包功能需要配置步骤较多,容易踩坑

  1. 从站点拷贝 rules.txt 文件下来,放在本工程 ./conf/ark/ 目录下
  2. 还需要在 pom.xml 里配置 packExcludesConfig
  3. packExcludesConfig 配置的值不能是 ./conf/ark/rules.txt 而只能是 rules.txt

问题解决思路

提供默认能力,继续使用 ark 提供的默认配置文件,在 conf/ark/bootstrap.properties, 或者 conf/ark/bootstrap.properties 里定义自动排包的配置key和value

image

lvjing2 avatar Nov 23 '23 10:11 lvjing2

当前业务配置 /conf/ark/bootstrap.properties, 会在container启动时扫描到,并缓存到 ArkConfigs.CFG

排包配置,实际不需要运行时使用,不必要缓存到 ArkConfigs.CFG

yuanyuancin avatar Dec 21 '23 07:12 yuanyuancin

可以做成配置优先的原则,存在 /conf/ark/rules.txt 文件,即可自动排包,不需要在打包插件中配置

yuanyuancin avatar Dec 21 '23 07:12 yuanyuancin

  1. 修改配置文件名
  2. 修改配置文件格式

lvjing2 avatar Dec 29 '23 10:12 lvjing2