跳转到内容

Trantor 升级 0.10

由于 Trantor 0.10 在研发态引入了多租户和多项目概念,因此有部分变动。对无该需求的部署实例,所有内容都会在默认租户和默认项目下。而对有该需求的部署实例而言(例如 GW),则在使用 Maven 插件 deploy 元数据时,需要升级插件并指定对应的租户和项目信息。详见下文的插件新增功能。

依赖变更

<dependency>
<groupId>io.terminus.trantor</groupId>
<artifactId>framework</artifactId>
<version>0.10.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.terminus.trantor</groupId>
<artifactId>api</artifactId>
<version>0.10.0-SNAPSHOT</version>
</dependency>
<plugin>
<groupId>io.terminus.trantor</groupId>
<artifactId>trantor-metadata-maven-plugin</artifactId>
<version>1.0.2-SNAPSHOT</version>
<configuration>
<modulePackageName>io.terminus.myModulePackage</modulePackageName>
<metaStoreURL>http://remoteMetaStoreURL</metaStoreURL>
</configuration>
<executions>
<execution>
<goals>
<goal>install</goal>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>

插件命令变更

现在在 maven compile 阶段都可以执行 trantor.install/deploy。

发布元信息到插件中指定的 Meta Store

Terminal window
mvn clean install -Dtrantor.deploy

发布到本地 CLI 启动的 Meta Store

Terminal window
mvn clean install -Dtrantor.deploy.local

发布到指定的 Meta Store

Terminal window
mvn clean install -Dtrantor.deploy -Dtrantor.deploy.url=http://myURL

插件新增功能

在 deploy trantor 元信息时,可以自行指定租户和项目 code ,**需注意此处为 code ,而非 id **:

Terminal window
mvn clean install -Dtrantor.deploy -Dtrantor.tenantCode=myTenantCode -Dtrantor.projectCode=myProjectCode