diff --git a/dubbo-plugin/dubbo-compiler/src/main/resources/Dubbo3InterfaceStub.mustache b/dubbo-plugin/dubbo-compiler/src/main/resources/Dubbo3InterfaceStub.mustache index ebbaad9f7d..2764d63e83 100644 --- a/dubbo-plugin/dubbo-compiler/src/main/resources/Dubbo3InterfaceStub.mustache +++ b/dubbo-plugin/dubbo-compiler/src/main/resources/Dubbo3InterfaceStub.mustache @@ -28,7 +28,12 @@ import java.util.concurrent.atomic.AtomicBoolean; public interface {{interfaceClassName}} extends org.apache.dubbo.rpc.model.DubboStub { static final String JAVA_SERVICE_NAME = "{{packageName}}.{{serviceName}}"; +{{#commonPackageName}} static final String SERVICE_NAME = "{{commonPackageName}}.{{serviceName}}"; +{{/commonPackageName}} +{{^commonPackageName}} + static final String SERVICE_NAME = "{{serviceName}}"; +{{/commonPackageName}} // FIXME, initialize Dubbo3 stub when interface loaded, thinking of new ways doing this. static final boolean inited = {{className}}.init(); diff --git a/dubbo-plugin/dubbo-compiler/src/main/resources/Dubbo3TripleInterfaceStub.mustache b/dubbo-plugin/dubbo-compiler/src/main/resources/Dubbo3TripleInterfaceStub.mustache index 72b68c3d67..d4ca6653f9 100644 --- a/dubbo-plugin/dubbo-compiler/src/main/resources/Dubbo3TripleInterfaceStub.mustache +++ b/dubbo-plugin/dubbo-compiler/src/main/resources/Dubbo3TripleInterfaceStub.mustache @@ -30,8 +30,12 @@ import java.util.concurrent.CompletableFuture; public interface {{interfaceClassName}} extends org.apache.dubbo.rpc.model.DubboStub { String JAVA_SERVICE_NAME = "{{packageName}}.{{serviceName}}"; +{{#commonPackageName}} String SERVICE_NAME = "{{commonPackageName}}.{{serviceName}}"; - +{{/commonPackageName}} +{{^commonPackageName}} + String SERVICE_NAME = "{{serviceName}}"; +{{/commonPackageName}} {{#unaryMethods}} {{#javaDoc}} {{{javaDoc}}} diff --git a/dubbo-plugin/dubbo-compiler/src/main/resources/ReactorDubbo3TripleInterfaceStub.mustache b/dubbo-plugin/dubbo-compiler/src/main/resources/ReactorDubbo3TripleInterfaceStub.mustache index 43e427f9f3..59114929e5 100644 --- a/dubbo-plugin/dubbo-compiler/src/main/resources/ReactorDubbo3TripleInterfaceStub.mustache +++ b/dubbo-plugin/dubbo-compiler/src/main/resources/ReactorDubbo3TripleInterfaceStub.mustache @@ -25,9 +25,12 @@ import reactor.core.publisher.Mono; public interface {{interfaceClassName}} extends org.apache.dubbo.rpc.model.DubboStub { String JAVA_SERVICE_NAME = "{{packageName}}.{{serviceName}}"; - +{{#commonPackageName}} String SERVICE_NAME = "{{commonPackageName}}.{{serviceName}}"; - +{{/commonPackageName}} +{{^commonPackageName}} + String SERVICE_NAME = "{{commonPackageName}}.{{serviceName}}"; +{{/commonPackageName}} {{#methods}} {{#javaDoc}} {{{javaDoc}}}