sofastack/sofa-ark

[sofa-ark-maven-plugin] maven 打包插件中configuration可以增加一些自定属性吗?

ccwxl opened this issue · 7 comments

Feature description

    <plugin>
                <groupId>com.alipay.sofa</groupId>
                <artifactId>sofa-ark-maven-plugin</artifactId>
                <version>${sofa.ark.version}</version>
                <executions>
                    <execution>
                        <id>default-cli</id>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <skipArkExecutable>true</skipArkExecutable>
                    <outputDirectory>./target</outputDirectory>
                    <bizName>parser-binary</bizName>
                    <webContextPath>binary</webContextPath>
                    <declaredMode>true</declaredMode>
                    <packExcludesConfig>rules.txt</packExcludesConfig>
                    <!--					打包、安装和发布 ark biz-->
                    <!--					静态合并部署需要配置-->
                    <!--					<attach>true</attach>-->
                </configuration>
            </plugin>
  • configuration 下增加自定义属性,或者说给这个模块增加自定义标识?
  • 多租户场景,可能一个接口多个实现,但属于不同的租户,这种除了使用biz-name区别,还有没有能定位某个接口实现的方法。
  1. configuration 下增加自定义属性,或者说给这个模块增加自定义标识?

是否可以考虑使用 bizName 来区别呢

  1. 多租户场景,可能一个接口多个实现,但属于不同的租户,这种除了使用biz-name区别,还有没有能定位某个接口实现的方法。

你的意思是你会把这个接口的多个不同实现放在同一个模块里,然后通过这里的配置,发布出不同服务让上游调用吗?有没有考虑不同的实现放在不同模块里?如果确实要放在一个模块里,可以考虑使用我们提供的工具类,找到对应不同的实现。
https://sofaserverless.gitee.io/docs/tutorials/module-development/module-and-base-communication/#%E6%96%B9%E5%BC%8F%E4%BA%8C%E7%BC%96%E7%A8%8Bapi-springservicefinder-1
Uploading image.png…

就是一个租户对应一个模块对应一个实现,如果使用SpringServiceFinder``` Codec codec = SpringServiceFinder.getModuleService("parser", "0.0.1", "codec", Codec.class);

OK,我理解使用 SpringServiceFinder 是可以满足你的使用需求的?

SpringServiceFinder 目前看缺少一个tenant标识。或者是不是可以有一个filter 的函数,用户自己可以做下过滤。

SpringServiceFinder 现在的方法入参包含,bizName, bizVersion, beanName, interfaceOrClassName

我理解你们在不同 tenant 里实现的 bizName 或 beanName 至少有一个是不一样的?然后你们在你们内部平台里维护好 tenant 到对应 bizName 、 beanName 的映射关系

This issue has been automatically marked as stale because it has not had recent activity in the last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue or help wanted) or other activity occurs. Thank you for your contributions.

This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as pinned, good first issue or help wanted. Thank you for your contributions.