Skip to content
Permalink
Browse files
添加providerSuffix可配置项,来适配不同的provider后缀名
  • Loading branch information
xuegan committed Jun 28, 2018
1 parent a9d9d5c commit b2c12fe718fd297406d027a4dbace7818f1579b9
Showing 3 changed files with 5 additions and 3 deletions.
@@ -2,5 +2,6 @@
"output": "./packages/dubbo/src/__tests__/providers",
"entry": "com.alibaba.dubbo.demo",
"entryJarPath": "./java/dubbo-demo/dubbo-demo-api/target/dubbo-demo-api-2.5.7.jar",
"libDirPath": "./java/dubbo-demo/dubbo-demo-api/target/dependency/"
"libDirPath": "./java/dubbo-demo/dubbo-demo-api/target/dependency/",
"providerSuffix":"Service"
}
@@ -34,6 +34,7 @@ export async function extra(extraParam: IDubboExtInfo): Promise<IExtraResult> {
extraParam.entry,
extraParam.entryJarPath,
extraParam.libDirPath,
extraParam.providerSuffix || 'Provider',
]);

let err: string = '';
@@ -42,7 +43,6 @@ export async function extra(extraParam: IDubboExtInfo): Promise<IExtraResult> {
execCmd.stderr.setEncoding("utf8");
execCmd.stdout.on('data', (rowData:Buffer) => {
let output = rowData.toString("utf8");
console.log(output);
if (output.includes(startFlag)) {
let beginIndex = output.indexOf(startFlag) + startFlag.length;
jarDir = output.substring(beginIndex).trim();
@@ -51,7 +51,6 @@ export async function extra(extraParam: IDubboExtInfo): Promise<IExtraResult> {

execCmd.stderr.on('data', (rowData:Buffer) => {
err += rowData.toString("utf8");
console.log(err);
});

execCmd.on('close', code => {
@@ -27,6 +27,8 @@ export interface IDubboExtInfo {
entryJarPath: string;
//指定jar包依赖的包目录
libDirPath: string;
//provider后缀名可配置
providerSuffix: string;
}

export interface IConfig extends IDubboExtInfo {

0 comments on commit b2c12fe

Please sign in to comment.