From fd0cb02600ceb633644b755a20ee2b4ee445297b Mon Sep 17 00:00:00 2001 From: wxbty <38374721+wxbty@users.noreply.github.com> Date: Thu, 27 Apr 2023 16:09:16 +0800 Subject: [PATCH] add Gateway mode extension (#205) * add gateway mode * code style * Increase the original parameter type, javaBeanDescriptor passes the actual parameter type * add gateway mod * revert spc * use spi byteAccessor * add licence * add licnece * fix meta-inf * fix bug * fix * fix ver * remove unuse * fix ver * remove unuse * add some opt * add some opt * fix dep * fix licence --------- Co-authored-by: x-shadow-man <1494445739@qq.com> --- .../UserSpecifiedAddressRouter.java | 18 +- .../UserSpecifiedAddressRouter.java | 4 +- dubbo-extensions-dependencies-bom/pom.xml | 2 +- .../dubbo-gateway-common/pom.xml | 29 +++ .../common/OmnipotentCommonConstants.java | 40 +++++ .../dubbo-gateway-consumer/pom.xml | 42 +++++ .../config/InjvmConfigPostProcessor.java | 32 ++++ .../gateway/consumer/filter/OmnSerFilter.java | 166 +++++++++++++++++ ...rg.apache.dubbo.config.ConfigPostProcessor | 1 + .../internal/org.apache.dubbo.rpc.Filter | 1 + .../dubbo-gateway-provider/pom.xml | 50 ++++++ .../provider/ConfigDeployListener.java | 55 ++++++ .../gateway/provider/OmnipotentService.java | 42 +++++ .../gateway/provider/SnfByteAccessor.java | 46 +++++ .../provider/SnfDecodeableRpcInvocation.java | 168 ++++++++++++++++++ .../provider/filter/OmnipotentFilter.java | 91 ++++++++++ ...bo.common.deploy.ApplicationDeployListener | 1 + .../internal/org.apache.dubbo.rpc.Filter | 1 + ...ache.dubbo.rpc.protocol.dubbo.ByteAccessor | 1 + dubbo-gateway-extensions/pom.xml | 37 ++++ dubbo-mock-extensions/README.md | 3 +- dubbo-mock-extensions/README_ch.md | 3 +- pom.xml | 3 +- .../dubbo-serialization-avro-test/pom.xml | 2 +- .../dubbo-serialization-fastjson-test/pom.xml | 2 +- .../dubbo-serialization-fst-test/pom.xml | 2 +- .../dubbo-serialization-gson-test/pom.xml | 2 +- .../dubbo-serialization-kryo-test/pom.xml | 4 +- .../dubbo-serialization-protobuf-test/pom.xml | 2 +- .../pom.xml | 2 +- 30 files changed, 829 insertions(+), 23 deletions(-) create mode 100644 dubbo-gateway-extensions/dubbo-gateway-common/pom.xml create mode 100644 dubbo-gateway-extensions/dubbo-gateway-common/src/main/java/org/apache/dubbo/gateway/common/OmnipotentCommonConstants.java create mode 100644 dubbo-gateway-extensions/dubbo-gateway-consumer/pom.xml create mode 100644 dubbo-gateway-extensions/dubbo-gateway-consumer/src/main/java/org/apache/dubbo/gateway/consumer/config/InjvmConfigPostProcessor.java create mode 100644 dubbo-gateway-extensions/dubbo-gateway-consumer/src/main/java/org/apache/dubbo/gateway/consumer/filter/OmnSerFilter.java create mode 100644 dubbo-gateway-extensions/dubbo-gateway-consumer/src/main/resources/META-INF/dubbo/internal/org.apache.dubbo.config.ConfigPostProcessor create mode 100644 dubbo-gateway-extensions/dubbo-gateway-consumer/src/main/resources/META-INF/dubbo/internal/org.apache.dubbo.rpc.Filter create mode 100644 dubbo-gateway-extensions/dubbo-gateway-provider/pom.xml create mode 100644 dubbo-gateway-extensions/dubbo-gateway-provider/src/main/java/org/apache/dubbo/gateway/provider/ConfigDeployListener.java create mode 100644 dubbo-gateway-extensions/dubbo-gateway-provider/src/main/java/org/apache/dubbo/gateway/provider/OmnipotentService.java create mode 100644 dubbo-gateway-extensions/dubbo-gateway-provider/src/main/java/org/apache/dubbo/gateway/provider/SnfByteAccessor.java create mode 100644 dubbo-gateway-extensions/dubbo-gateway-provider/src/main/java/org/apache/dubbo/gateway/provider/SnfDecodeableRpcInvocation.java create mode 100644 dubbo-gateway-extensions/dubbo-gateway-provider/src/main/java/org/apache/dubbo/gateway/provider/filter/OmnipotentFilter.java create mode 100644 dubbo-gateway-extensions/dubbo-gateway-provider/src/main/resources/META-INF/dubbo/internal/org.apache.dubbo.common.deploy.ApplicationDeployListener create mode 100644 dubbo-gateway-extensions/dubbo-gateway-provider/src/main/resources/META-INF/dubbo/internal/org.apache.dubbo.rpc.Filter create mode 100644 dubbo-gateway-extensions/dubbo-gateway-provider/src/main/resources/META-INF/dubbo/internal/org.apache.dubbo.rpc.protocol.dubbo.ByteAccessor create mode 100644 dubbo-gateway-extensions/pom.xml diff --git a/dubbo-cluster-extensions/dubbo-cluster-specify-address-dubbo2/src/main/java/org/apache/dubbo/rpc/cluster/specifyaddress/UserSpecifiedAddressRouter.java b/dubbo-cluster-extensions/dubbo-cluster-specify-address-dubbo2/src/main/java/org/apache/dubbo/rpc/cluster/specifyaddress/UserSpecifiedAddressRouter.java index 84275e65..3ca0ab1d 100644 --- a/dubbo-cluster-extensions/dubbo-cluster-specify-address-dubbo2/src/main/java/org/apache/dubbo/rpc/cluster/specifyaddress/UserSpecifiedAddressRouter.java +++ b/dubbo-cluster-extensions/dubbo-cluster-specify-address-dubbo2/src/main/java/org/apache/dubbo/rpc/cluster/specifyaddress/UserSpecifiedAddressRouter.java @@ -175,7 +175,7 @@ public Invoker getInvokerByIp(Address address) { private void throwException(Address address) { throw new RpcException("user specified server address : [" + address + "] is not a valid provider for service: [" - + getUrl().getServiceKey() + "]"); + + getUrl().getServiceKey() + "]"); } @@ -253,14 +253,14 @@ public URL buildAddress(List> invokers, Address address, URL cons private URL copyConsumerUrl(URL url, String ip, int port, Map parameters) { return URLBuilder.from(url) - .setHost(ip) - .setPort(port) - .setProtocol(url.getProtocol() == null ? DUBBO : url.getProtocol()) - .setPath(url.getPath()) - .clearParameters() - .addParameters(parameters) - .removeParameter(MONITOR_KEY) - .build(); + .setHost(ip) + .setPort(port) + .setProtocol(url.getProtocol() == null ? DUBBO : url.getProtocol()) + .setPath(url.getPath()) + .clearParameters() + .addParameters(parameters) + .removeParameter(MONITOR_KEY) + .build(); } public URL rebuildAddress(Address address, URL consumerUrl) { diff --git a/dubbo-cluster-extensions/dubbo-cluster-specify-address-dubbo3/src/main/java/org/apache/dubbo/rpc/cluster/specifyaddress/UserSpecifiedAddressRouter.java b/dubbo-cluster-extensions/dubbo-cluster-specify-address-dubbo3/src/main/java/org/apache/dubbo/rpc/cluster/specifyaddress/UserSpecifiedAddressRouter.java index 00290a48..5ce7281b 100644 --- a/dubbo-cluster-extensions/dubbo-cluster-specify-address-dubbo3/src/main/java/org/apache/dubbo/rpc/cluster/specifyaddress/UserSpecifiedAddressRouter.java +++ b/dubbo-cluster-extensions/dubbo-cluster-specify-address-dubbo3/src/main/java/org/apache/dubbo/rpc/cluster/specifyaddress/UserSpecifiedAddressRouter.java @@ -70,7 +70,7 @@ public UserSpecifiedAddressRouter(URL referenceUrl) { this.scheduledExecutorService = referenceUrl.getScopeModel().getDefaultExtension(ExecutorRepository.class).nextScheduledExecutor(); this.protocol = referenceUrl.getOrDefaultFrameworkModel().getExtensionLoader(Protocol.class).getAdaptiveExtension(); this.userSpecifiedServiceAddressBuilder = referenceUrl.getScopeModel().getExtensionLoader(UserSpecifiedServiceAddressBuilder.class) - .getExtension(referenceUrl.getParameter(USER_SPECIFIED_SERVICE_ADDRESS_BUILDER_KEY, DefaultUserSpecifiedServiceAddressBuilder.NAME)); + .getExtension(referenceUrl.getParameter(USER_SPECIFIED_SERVICE_ADDRESS_BUILDER_KEY, DefaultUserSpecifiedServiceAddressBuilder.NAME)); } @Override @@ -240,7 +240,7 @@ private Invoker refer(URL url) { private void throwException(Address address) { throw new RpcException("user specified server address : [" + address + "] is not a valid provider for service: [" - + getUrl().getServiceKey() + "]"); + + getUrl().getServiceKey() + "]"); } private Map> processIp(List> invokerList) { diff --git a/dubbo-extensions-dependencies-bom/pom.xml b/dubbo-extensions-dependencies-bom/pom.xml index 33af21b7..ad325aa1 100644 --- a/dubbo-extensions-dependencies-bom/pom.xml +++ b/dubbo-extensions-dependencies-bom/pom.xml @@ -89,7 +89,7 @@ - 1.0.4-SNAPSHOT + 1.0.5-SNAPSHOT 3.1.2 5.2.9.RELEASE 2.4.1 diff --git a/dubbo-gateway-extensions/dubbo-gateway-common/pom.xml b/dubbo-gateway-extensions/dubbo-gateway-common/pom.xml new file mode 100644 index 00000000..7c401d8b --- /dev/null +++ b/dubbo-gateway-extensions/dubbo-gateway-common/pom.xml @@ -0,0 +1,29 @@ + + + + dubbo-gateway-extensions + org.apache.dubbo.extensions + ${revision} + ../pom.xml + + 4.0.0 + + dubbo-gateway-common + + diff --git a/dubbo-gateway-extensions/dubbo-gateway-common/src/main/java/org/apache/dubbo/gateway/common/OmnipotentCommonConstants.java b/dubbo-gateway-extensions/dubbo-gateway-common/src/main/java/org/apache/dubbo/gateway/common/OmnipotentCommonConstants.java new file mode 100644 index 00000000..314bcf38 --- /dev/null +++ b/dubbo-gateway-extensions/dubbo-gateway-common/src/main/java/org/apache/dubbo/gateway/common/OmnipotentCommonConstants.java @@ -0,0 +1,40 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.dubbo.gateway.common; + +public interface OmnipotentCommonConstants { + + //save origin group when service is omn + String ORIGIN_GROUP_KEY = "originGroup"; + + String ORIGIN_GENERIC_PARAMETER_TYPES = "originGenericParameterTypes"; + + String ORIGIN_PARAMETER_TYPES_DESC = "originParameterTypesDesc"; + + String $INVOKE_OMN = "$invokeOmn"; + + String ORIGIN_PATH_KEY = "originPath"; + + String ORIGIN_METHOD_KEY = "originMethod"; + + String ORIGIN_VERSION_KEY = "originVersion"; + + String SPECIFY_ADDRESS = "specifyAddress"; + String GATEWAY_MODE = "gatewayMode"; + +} diff --git a/dubbo-gateway-extensions/dubbo-gateway-consumer/pom.xml b/dubbo-gateway-extensions/dubbo-gateway-consumer/pom.xml new file mode 100644 index 00000000..2d1ead7f --- /dev/null +++ b/dubbo-gateway-extensions/dubbo-gateway-consumer/pom.xml @@ -0,0 +1,42 @@ + + + + dubbo-gateway-extensions + org.apache.dubbo.extensions + ${revision} + ../pom.xml + + 4.0.0 + + dubbo-gateway-consumer + + + + org.apache.dubbo + dubbo + provided + + + org.apache.dubbo.extensions + dubbo-gateway-common + ${project.version} + + + + diff --git a/dubbo-gateway-extensions/dubbo-gateway-consumer/src/main/java/org/apache/dubbo/gateway/consumer/config/InjvmConfigPostProcessor.java b/dubbo-gateway-extensions/dubbo-gateway-consumer/src/main/java/org/apache/dubbo/gateway/consumer/config/InjvmConfigPostProcessor.java new file mode 100644 index 00000000..0212bd37 --- /dev/null +++ b/dubbo-gateway-extensions/dubbo-gateway-consumer/src/main/java/org/apache/dubbo/gateway/consumer/config/InjvmConfigPostProcessor.java @@ -0,0 +1,32 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.dubbo.gateway.consumer.config; + +import org.apache.dubbo.common.extension.Activate; +import org.apache.dubbo.config.ConfigPostProcessor; +import org.apache.dubbo.config.ReferenceConfig; +import org.apache.dubbo.rpc.Constants; + +@Activate +public class InjvmConfigPostProcessor implements ConfigPostProcessor { + + @Override + public void postProcessReferConfig(ReferenceConfig referenceConfig) { + referenceConfig.setScope(Constants.SCOPE_REMOTE); + } +} diff --git a/dubbo-gateway-extensions/dubbo-gateway-consumer/src/main/java/org/apache/dubbo/gateway/consumer/filter/OmnSerFilter.java b/dubbo-gateway-extensions/dubbo-gateway-consumer/src/main/java/org/apache/dubbo/gateway/consumer/filter/OmnSerFilter.java new file mode 100644 index 00000000..49f3b8f0 --- /dev/null +++ b/dubbo-gateway-extensions/dubbo-gateway-consumer/src/main/java/org/apache/dubbo/gateway/consumer/filter/OmnSerFilter.java @@ -0,0 +1,166 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.dubbo.gateway.consumer.filter; + +import org.apache.dubbo.common.beanutil.JavaBeanDescriptor; +import org.apache.dubbo.common.beanutil.JavaBeanSerializeUtil; +import org.apache.dubbo.common.constants.CommonConstants; +import org.apache.dubbo.common.extension.Activate; +import org.apache.dubbo.common.logger.Logger; +import org.apache.dubbo.common.logger.LoggerFactory; +import org.apache.dubbo.common.utils.ReflectUtils; +import org.apache.dubbo.rpc.Filter; +import org.apache.dubbo.rpc.Invocation; +import org.apache.dubbo.rpc.Invoker; +import org.apache.dubbo.rpc.Result; +import org.apache.dubbo.rpc.RpcContext; +import org.apache.dubbo.rpc.RpcException; +import org.apache.dubbo.rpc.RpcInvocation; + +import java.lang.reflect.Field; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Stream; + +import static org.apache.dubbo.gateway.common.OmnipotentCommonConstants.GATEWAY_MODE; +import static org.apache.dubbo.gateway.common.OmnipotentCommonConstants.ORIGIN_GENERIC_PARAMETER_TYPES; +import static org.apache.dubbo.gateway.common.OmnipotentCommonConstants.ORIGIN_PARAMETER_TYPES_DESC; +import static org.apache.dubbo.gateway.common.OmnipotentCommonConstants.SPECIFY_ADDRESS; + + +@Activate(group = CommonConstants.CONSUMER) +public class OmnSerFilter implements Filter, Filter.Listener { + + private final static Logger logger = LoggerFactory.getLogger(OmnSerFilter.class); + + public static final String name = "specifyAddress"; + + @Override + public Result invoke(Invoker invoker, Invocation invocation) throws RpcException { + + Object address = invocation.get(SPECIFY_ADDRESS); + if (address != null) { + RpcContext.getClientAttachment().setAttachment(GATEWAY_MODE, "omn"); + convertParameterTypeToJavaBeanDescriptor(invocation); + } + return invoker.invoke(invocation); + } + + + @Override + public void onResponse(Result appResponse, Invoker invoker, Invocation inv) { + + Object resData = appResponse.getValue(); + if (resData == null) { + return; + } + + if (ReflectUtils.isPrimitives(resData.getClass())) { + return; + } + generalizeJbdParameter(appResponse.getValue()); + } + + @Override + public void onError(Throwable t, Invoker invoker, Invocation invocation) { + + } + + + @SuppressWarnings({"unchecked", "rawtypes"}) + private void generalizeJbdParameter(Object pojo) { + if (pojo instanceof Collection) { + + Collection collection = (Collection) pojo; + List list = new ArrayList(); + for (Object obj : collection) { + if (obj instanceof JavaBeanDescriptor) { + list.add(JavaBeanSerializeUtil.deserialize((JavaBeanDescriptor) obj)); + } else { + list.add(obj); + } + } + collection.clear(); + collection.addAll(list); + } + + if (pojo instanceof Map) { + + Map map = (Map) pojo; + Map newMap = new HashMap(); + for (Object key : map.keySet()) { + + Object value = map.get(key); + if (key instanceof JavaBeanDescriptor) { + key = JavaBeanSerializeUtil.deserialize((JavaBeanDescriptor) key); + } + if (value instanceof JavaBeanDescriptor) { + value = JavaBeanSerializeUtil.deserialize((JavaBeanDescriptor) value); + } + newMap.put(key, value); + + } + map.clear(); + map.putAll(newMap); + } + + // public field + for (Field field : pojo.getClass().getDeclaredFields()) { + try { + field.setAccessible(true); + Object fieldValue = field.get(pojo); + if (fieldValue instanceof JavaBeanDescriptor) { + field.set(pojo, JavaBeanSerializeUtil.deserialize((JavaBeanDescriptor) fieldValue)); + } + } catch (Exception e) { + throw new RuntimeException(e.getMessage(), e); + } + } + } + + public static void convertParameterTypeToJavaBeanDescriptor(Invocation invocation) { + if (!(invocation instanceof RpcInvocation)) { + logger.warn("Non-RpcInvocation type, gateway mode does not take effect, type:" + invocation.getClass().getName()); + return; + } + Class[] parameterTypes = invocation.getParameterTypes(); + boolean reqFirst = Arrays.stream(parameterTypes).noneMatch(param -> param == JavaBeanDescriptor.class); + if (reqFirst) { + invocation.setObjectAttachment(ORIGIN_GENERIC_PARAMETER_TYPES, getDesc(parameterTypes)); + invocation.setObjectAttachment(ORIGIN_PARAMETER_TYPES_DESC, ((RpcInvocation) invocation).getParameterTypesDesc()); + Arrays.fill(parameterTypes, JavaBeanDescriptor.class); + + Object[] arguments = invocation.getArguments(); + for (int i = 0; i < arguments.length; i++) { + JavaBeanDescriptor jbdArg = JavaBeanSerializeUtil.serialize(arguments[i]); + arguments[i] = jbdArg; + } + + ((RpcInvocation) invocation).setParameterTypesDesc(ReflectUtils.getDesc(parameterTypes)); + ((RpcInvocation) invocation).setCompatibleParamSignatures(Stream.of(parameterTypes).map(Class::getName).toArray(String[]::new)); + } + + } + + private static String[] getDesc(Class[] parameterTypes) { + return Arrays.stream(parameterTypes).map(Class::getName).toArray(String[]::new); + } +} diff --git a/dubbo-gateway-extensions/dubbo-gateway-consumer/src/main/resources/META-INF/dubbo/internal/org.apache.dubbo.config.ConfigPostProcessor b/dubbo-gateway-extensions/dubbo-gateway-consumer/src/main/resources/META-INF/dubbo/internal/org.apache.dubbo.config.ConfigPostProcessor new file mode 100644 index 00000000..058a13e7 --- /dev/null +++ b/dubbo-gateway-extensions/dubbo-gateway-consumer/src/main/resources/META-INF/dubbo/internal/org.apache.dubbo.config.ConfigPostProcessor @@ -0,0 +1 @@ +injvm-initial=org.apache.dubbo.gateway.consumer.config.InjvmConfigPostProcessor diff --git a/dubbo-gateway-extensions/dubbo-gateway-consumer/src/main/resources/META-INF/dubbo/internal/org.apache.dubbo.rpc.Filter b/dubbo-gateway-extensions/dubbo-gateway-consumer/src/main/resources/META-INF/dubbo/internal/org.apache.dubbo.rpc.Filter new file mode 100644 index 00000000..319ef6f0 --- /dev/null +++ b/dubbo-gateway-extensions/dubbo-gateway-consumer/src/main/resources/META-INF/dubbo/internal/org.apache.dubbo.rpc.Filter @@ -0,0 +1 @@ +omnSer=org.apache.dubbo.gateway.consumer.filter.OmnSerFilter diff --git a/dubbo-gateway-extensions/dubbo-gateway-provider/pom.xml b/dubbo-gateway-extensions/dubbo-gateway-provider/pom.xml new file mode 100644 index 00000000..c673308c --- /dev/null +++ b/dubbo-gateway-extensions/dubbo-gateway-provider/pom.xml @@ -0,0 +1,50 @@ + + + + dubbo-gateway-extensions + org.apache.dubbo.extensions + ${revision} + ../pom.xml + + 4.0.0 + + dubbo-gateway-provider + + + 8 + 8 + + + + + + org.apache.dubbo + dubbo + 3.2.0 + true + + + org.apache.dubbo.extensions + dubbo-gateway-common + ${project.version} + + + + + diff --git a/dubbo-gateway-extensions/dubbo-gateway-provider/src/main/java/org/apache/dubbo/gateway/provider/ConfigDeployListener.java b/dubbo-gateway-extensions/dubbo-gateway-provider/src/main/java/org/apache/dubbo/gateway/provider/ConfigDeployListener.java new file mode 100644 index 00000000..788d8c02 --- /dev/null +++ b/dubbo-gateway-extensions/dubbo-gateway-provider/src/main/java/org/apache/dubbo/gateway/provider/ConfigDeployListener.java @@ -0,0 +1,55 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.dubbo.gateway.provider; + +import org.apache.dubbo.common.deploy.ApplicationDeployListener; +import org.apache.dubbo.rpc.model.ApplicationModel; + +import static org.apache.dubbo.common.constants.CommonConstants.BYTE_ACCESSOR_KEY; + +public class ConfigDeployListener implements ApplicationDeployListener { + + @Override + public void onInitialize(ApplicationModel scopeModel) { + System.setProperty(BYTE_ACCESSOR_KEY, "snf"); + } + + @Override + public void onStarting(ApplicationModel scopeModel) { + + } + + @Override + public void onStarted(ApplicationModel scopeModel) { + } + + @Override + public void onStopping(ApplicationModel scopeModel) { + + } + + @Override + public void onStopped(ApplicationModel scopeModel) { + + } + + @Override + public void onFailure(ApplicationModel scopeModel, Throwable cause) { + + } +} diff --git a/dubbo-gateway-extensions/dubbo-gateway-provider/src/main/java/org/apache/dubbo/gateway/provider/OmnipotentService.java b/dubbo-gateway-extensions/dubbo-gateway-provider/src/main/java/org/apache/dubbo/gateway/provider/OmnipotentService.java new file mode 100644 index 00000000..07a8ae3e --- /dev/null +++ b/dubbo-gateway-extensions/dubbo-gateway-provider/src/main/java/org/apache/dubbo/gateway/provider/OmnipotentService.java @@ -0,0 +1,42 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.dubbo.gateway.provider; + +import org.apache.dubbo.rpc.Invocation; +import org.apache.dubbo.rpc.service.GenericException; +import org.apache.dubbo.rpc.service.GenericService; + +/** + * A more general server-side generalization service than {@link GenericService} + * Any type of interface can be accepted + * + * @since 3.2.0 + */ +public interface OmnipotentService { + + /** + * Generic invocation + * + * @param invocation New construction point invocation, including original service, method and other information + * @return Custom object + * @throws GenericException potential exception thrown from the invocation + */ + Object $invokeOmn(Invocation invocation) throws GenericException; + + +} diff --git a/dubbo-gateway-extensions/dubbo-gateway-provider/src/main/java/org/apache/dubbo/gateway/provider/SnfByteAccessor.java b/dubbo-gateway-extensions/dubbo-gateway-provider/src/main/java/org/apache/dubbo/gateway/provider/SnfByteAccessor.java new file mode 100644 index 00000000..9adf6025 --- /dev/null +++ b/dubbo-gateway-extensions/dubbo-gateway-provider/src/main/java/org/apache/dubbo/gateway/provider/SnfByteAccessor.java @@ -0,0 +1,46 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.dubbo.gateway.provider; + +import org.apache.dubbo.remoting.Channel; +import org.apache.dubbo.remoting.exchange.Request; +import org.apache.dubbo.rpc.model.FrameworkModel; +import org.apache.dubbo.rpc.protocol.dubbo.ByteAccessor; +import org.apache.dubbo.rpc.protocol.dubbo.DecodeableRpcInvocation; + +import java.io.InputStream; + +/** + * Customize byte parsing so that execution can continue when the service does not exist + * + * @since 3.2.0 + */ +public class SnfByteAccessor implements ByteAccessor { + + private final FrameworkModel frameworkModel; + + public SnfByteAccessor(FrameworkModel frameworkModel) { + this.frameworkModel = frameworkModel; + } + + @Override + public DecodeableRpcInvocation getRpcInvocation(Channel channel, Request req, InputStream is, byte proto) { + + return new SnfDecodeableRpcInvocation(frameworkModel, channel, req, is, proto); + } +} diff --git a/dubbo-gateway-extensions/dubbo-gateway-provider/src/main/java/org/apache/dubbo/gateway/provider/SnfDecodeableRpcInvocation.java b/dubbo-gateway-extensions/dubbo-gateway-provider/src/main/java/org/apache/dubbo/gateway/provider/SnfDecodeableRpcInvocation.java new file mode 100644 index 00000000..89993974 --- /dev/null +++ b/dubbo-gateway-extensions/dubbo-gateway-provider/src/main/java/org/apache/dubbo/gateway/provider/SnfDecodeableRpcInvocation.java @@ -0,0 +1,168 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.dubbo.gateway.provider; + +import org.apache.dubbo.common.beanutil.JavaBeanDescriptor; +import org.apache.dubbo.common.beanutil.JavaBeanSerializeUtil; +import org.apache.dubbo.common.serialize.Cleanable; +import org.apache.dubbo.common.serialize.ObjectInput; +import org.apache.dubbo.common.utils.CollectionUtils; +import org.apache.dubbo.common.utils.ReflectUtils; +import org.apache.dubbo.common.utils.StringUtils; +import org.apache.dubbo.gateway.common.OmnipotentCommonConstants; +import org.apache.dubbo.remoting.Channel; +import org.apache.dubbo.remoting.exchange.Request; +import org.apache.dubbo.remoting.transport.CodecSupport; +import org.apache.dubbo.rpc.Invocation; +import org.apache.dubbo.rpc.model.FrameworkModel; +import org.apache.dubbo.rpc.protocol.dubbo.DecodeableRpcInvocation; +import org.apache.dubbo.rpc.protocol.dubbo.DubboCodec; +import org.apache.dubbo.rpc.support.RpcUtils; + +import java.io.IOException; +import java.io.InputStream; +import java.util.Map; + +import static org.apache.dubbo.common.constants.CommonConstants.DEFAULT_VERSION; +import static org.apache.dubbo.common.constants.CommonConstants.DUBBO_VERSION_KEY; +import static org.apache.dubbo.common.constants.CommonConstants.GROUP_KEY; +import static org.apache.dubbo.common.constants.CommonConstants.INTERFACE_KEY; +import static org.apache.dubbo.common.constants.CommonConstants.METHOD_KEY; +import static org.apache.dubbo.common.constants.CommonConstants.PATH_KEY; +import static org.apache.dubbo.common.constants.CommonConstants.VERSION_KEY; +import static org.apache.dubbo.gateway.common.OmnipotentCommonConstants.$INVOKE_OMN; +import static org.apache.dubbo.gateway.common.OmnipotentCommonConstants.ORIGIN_GENERIC_PARAMETER_TYPES; +import static org.apache.dubbo.gateway.common.OmnipotentCommonConstants.ORIGIN_GROUP_KEY; +import static org.apache.dubbo.gateway.common.OmnipotentCommonConstants.ORIGIN_PARAMETER_TYPES_DESC; +import static org.apache.dubbo.rpc.Constants.SERIALIZATION_ID_KEY; + +public class SnfDecodeableRpcInvocation extends DecodeableRpcInvocation { + + private static final String DEFAULT_OMNIPOTENT_SERVICE = OmnipotentService.class.getName(); + + + public SnfDecodeableRpcInvocation(FrameworkModel frameworkModel, Channel channel, Request request, InputStream is, byte id) { + super(frameworkModel, channel, request, is, id); + } + + @Override + public Object decode(Channel channel, InputStream input) throws IOException { + ObjectInput in = CodecSupport.getSerialization(serializationType) + .deserialize(channel.getUrl(), input); + this.put(SERIALIZATION_ID_KEY, serializationType); + + String dubboVersion = in.readUTF(); + request.setVersion(dubboVersion); + setAttachment(DUBBO_VERSION_KEY, dubboVersion); + + String path = in.readUTF(); + setAttachment(PATH_KEY, path); + String version = in.readUTF(); + setAttachment(VERSION_KEY, version); + + setMethodName(in.readUTF()); + + String desc = in.readUTF(); + setParameterTypesDesc(desc); + + ClassLoader originClassLoader = Thread.currentThread().getContextClassLoader(); + + try { + Object[] args = DubboCodec.EMPTY_OBJECT_ARRAY; + Class[] pts = DubboCodec.EMPTY_CLASS_ARRAY; + if (desc.length() > 0) { + pts = drawPts(path, version, desc, pts); + if (pts == DubboCodec.EMPTY_CLASS_ARRAY) { + // Service not found ,pts = JavaBeanDescriptor + pts = ReflectUtils.desc2classArray(desc); + } + args = drawArgs(in, pts); + } + setParameterTypes(pts); + setAttachment(ORIGIN_GENERIC_PARAMETER_TYPES, pts); + + Map map = in.readAttachments(); + Class[] retryPts = null; + if (CollectionUtils.isNotEmptyMap(map)) { + if (map.containsKey(ORIGIN_PARAMETER_TYPES_DESC)) { + String originParameterTypesDesc = map.get(ORIGIN_PARAMETER_TYPES_DESC).toString(); + retryPts = drawPts(path, version, originParameterTypesDesc, DubboCodec.EMPTY_CLASS_ARRAY); + boolean snf = (retryPts == DubboCodec.EMPTY_CLASS_ARRAY) && !RpcUtils.isGenericCall(originParameterTypesDesc, getMethodName()) && !RpcUtils.isEcho(originParameterTypesDesc, getMethodName()); + if (snf) { + setAttachment(OmnipotentCommonConstants.ORIGIN_PATH_KEY, getAttachment(PATH_KEY)); + // Replace serviceName in req with omn + setAttachment(PATH_KEY, DEFAULT_OMNIPOTENT_SERVICE); + setAttachment(INTERFACE_KEY, DEFAULT_OMNIPOTENT_SERVICE); + + // version + setAttachment(OmnipotentCommonConstants.ORIGIN_VERSION_KEY, getAttachment(VERSION_KEY)); + setAttachment(VERSION_KEY, DEFAULT_VERSION); + + // method + setAttachment(OmnipotentCommonConstants.ORIGIN_METHOD_KEY, getMethodName()); + setAttachment(METHOD_KEY, $INVOKE_OMN); + setMethodName($INVOKE_OMN); + setParameterTypes(new Class[]{Invocation.class}); + + // Omn needs to use the default path, version and group, + // and the original value starts with origin to save the variable + map.remove(PATH_KEY); + map.remove(VERSION_KEY); + if (map.containsKey(GROUP_KEY)) { + map.put(ORIGIN_GROUP_KEY, map.get(GROUP_KEY)); + map.remove(GROUP_KEY); + } + retryPts = (Class[]) getObjectAttachments().get(ORIGIN_GENERIC_PARAMETER_TYPES); + } + } + + addObjectAttachments(map); + } + + boolean isConvert = false; + for (Class clazz : pts) { + if (clazz == JavaBeanDescriptor.class) { + isConvert = true; + break; + } + } + // isConvert = snf + if (isConvert) { + setParameterTypes(retryPts); + pts = retryPts; + Object[] newArgs = new Object[args.length]; + for (int i = 0; i < args.length; i++) { + if (args[i] instanceof JavaBeanDescriptor) { + newArgs[i] = JavaBeanSerializeUtil.deserialize((JavaBeanDescriptor) args[i]); + } + } + args = newArgs; + } + decodeArgument(channel, pts, args); + } catch (ClassNotFoundException e) { + throw new IOException(StringUtils.toString("Read invocation data failed.", e)); + } finally { + Thread.currentThread().setContextClassLoader(originClassLoader); + if (in instanceof Cleanable) { + ((Cleanable) in).cleanup(); + } + } + return this; + } + +} diff --git a/dubbo-gateway-extensions/dubbo-gateway-provider/src/main/java/org/apache/dubbo/gateway/provider/filter/OmnipotentFilter.java b/dubbo-gateway-extensions/dubbo-gateway-provider/src/main/java/org/apache/dubbo/gateway/provider/filter/OmnipotentFilter.java new file mode 100644 index 00000000..3357a6dd --- /dev/null +++ b/dubbo-gateway-extensions/dubbo-gateway-provider/src/main/java/org/apache/dubbo/gateway/provider/filter/OmnipotentFilter.java @@ -0,0 +1,91 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.dubbo.gateway.provider.filter; + +import org.apache.dubbo.common.beanutil.JavaBeanAccessor; +import org.apache.dubbo.common.beanutil.JavaBeanDescriptor; +import org.apache.dubbo.common.beanutil.JavaBeanSerializeUtil; +import org.apache.dubbo.common.constants.CommonConstants; +import org.apache.dubbo.common.extension.Activate; +import org.apache.dubbo.gateway.common.OmnipotentCommonConstants; +import org.apache.dubbo.gateway.provider.OmnipotentService; +import org.apache.dubbo.rpc.Filter; +import org.apache.dubbo.rpc.Invocation; +import org.apache.dubbo.rpc.Invoker; +import org.apache.dubbo.rpc.Result; +import org.apache.dubbo.rpc.RpcContext; +import org.apache.dubbo.rpc.RpcException; +import org.apache.dubbo.rpc.RpcInvocation; + +import static org.apache.dubbo.common.constants.CommonConstants.GROUP_KEY; +import static org.apache.dubbo.common.constants.CommonConstants.PATH_KEY; +import static org.apache.dubbo.common.constants.CommonConstants.VERSION_KEY; + +/** + * Set the method name, formal parameters, and actual parameters for + * the invokeOmn method of the Omnipotent generalized service + */ +@Activate(group = CommonConstants.PROVIDER, order = -21000) +public class OmnipotentFilter implements Filter { + + @Override + public Result invoke(Invoker invoker, Invocation inv) throws RpcException { + + if (isOmnipotent(invoker.getInterface())) { + setOmnArgs(inv); + inv.getObjectAttachments().remove(OmnipotentCommonConstants.ORIGIN_GENERIC_PARAMETER_TYPES); + RpcContext.getServerAttachment().removeAttachment(OmnipotentCommonConstants.ORIGIN_GENERIC_PARAMETER_TYPES); + } + + return invoker.invoke(inv); + } + + private boolean isOmnipotent(Class interfaceClass) { + return OmnipotentService.class.isAssignableFrom(interfaceClass); + } + + // Restore method information before actual call + private void setOmnArgs(Invocation inv) { + Class[] parameterTypes = (Class[]) inv.getObjectAttachment(OmnipotentCommonConstants.ORIGIN_GENERIC_PARAMETER_TYPES, new Class[]{Invocation.class}); + Object[] arguments = inv.getArguments(); + + Object[] args = new Object[arguments.length]; + for (int i = 0; i < arguments.length; i++) { + // In gateway mode, consumer has used JavaBeanDescriptor as parameter + if (arguments[i] instanceof JavaBeanDescriptor) { + args[i] = arguments[i]; + } else { + args[i] = JavaBeanSerializeUtil.serialize(arguments[i], JavaBeanAccessor.METHOD); + } + } + + RpcInvocation rpcInvocation = new RpcInvocation(inv); + // method + rpcInvocation.setMethodName(inv.getAttachment(OmnipotentCommonConstants.ORIGIN_METHOD_KEY)); + rpcInvocation.setParameterTypes(parameterTypes); + rpcInvocation.setArguments(args); + rpcInvocation.setParameterTypesDesc(inv.getAttachment(OmnipotentCommonConstants.ORIGIN_PARAMETER_TYPES_DESC)); + + // attachment + rpcInvocation.setAttachment(PATH_KEY, inv.getAttachment(OmnipotentCommonConstants.ORIGIN_PATH_KEY)); + rpcInvocation.setAttachment(VERSION_KEY, inv.getAttachment(OmnipotentCommonConstants.ORIGIN_VERSION_KEY)); + rpcInvocation.setAttachment(GROUP_KEY, inv.getAttachment(OmnipotentCommonConstants.ORIGIN_GROUP_KEY)); + ((RpcInvocation) inv).setArguments(new Object[]{rpcInvocation}); + + } + +} diff --git a/dubbo-gateway-extensions/dubbo-gateway-provider/src/main/resources/META-INF/dubbo/internal/org.apache.dubbo.common.deploy.ApplicationDeployListener b/dubbo-gateway-extensions/dubbo-gateway-provider/src/main/resources/META-INF/dubbo/internal/org.apache.dubbo.common.deploy.ApplicationDeployListener new file mode 100644 index 00000000..04ede7f5 --- /dev/null +++ b/dubbo-gateway-extensions/dubbo-gateway-provider/src/main/resources/META-INF/dubbo/internal/org.apache.dubbo.common.deploy.ApplicationDeployListener @@ -0,0 +1 @@ +snfConfig=org.apache.dubbo.gateway.provider.ConfigDeployListener diff --git a/dubbo-gateway-extensions/dubbo-gateway-provider/src/main/resources/META-INF/dubbo/internal/org.apache.dubbo.rpc.Filter b/dubbo-gateway-extensions/dubbo-gateway-provider/src/main/resources/META-INF/dubbo/internal/org.apache.dubbo.rpc.Filter new file mode 100644 index 00000000..9247c64e --- /dev/null +++ b/dubbo-gateway-extensions/dubbo-gateway-provider/src/main/resources/META-INF/dubbo/internal/org.apache.dubbo.rpc.Filter @@ -0,0 +1 @@ +omnipotent=org.apache.dubbo.gateway.provider.filter.OmnipotentFilter diff --git a/dubbo-gateway-extensions/dubbo-gateway-provider/src/main/resources/META-INF/dubbo/internal/org.apache.dubbo.rpc.protocol.dubbo.ByteAccessor b/dubbo-gateway-extensions/dubbo-gateway-provider/src/main/resources/META-INF/dubbo/internal/org.apache.dubbo.rpc.protocol.dubbo.ByteAccessor new file mode 100644 index 00000000..7e33fa6b --- /dev/null +++ b/dubbo-gateway-extensions/dubbo-gateway-provider/src/main/resources/META-INF/dubbo/internal/org.apache.dubbo.rpc.protocol.dubbo.ByteAccessor @@ -0,0 +1 @@ +snf=org.apache.dubbo.gateway.provider.SnfByteAccessor diff --git a/dubbo-gateway-extensions/pom.xml b/dubbo-gateway-extensions/pom.xml new file mode 100644 index 00000000..3a41e5ac --- /dev/null +++ b/dubbo-gateway-extensions/pom.xml @@ -0,0 +1,37 @@ + + + + org.apache.dubbo.extensions + extensions-parent + ${revision} + ../pom.xml + + 4.0.0 + + dubbo-gateway-extensions + ${revision} + pom + + + dubbo-gateway-common + dubbo-gateway-provider + dubbo-gateway-consumer + + + diff --git a/dubbo-mock-extensions/README.md b/dubbo-mock-extensions/README.md index 0cb54877..7db308cc 100644 --- a/dubbo-mock-extensions/README.md +++ b/dubbo-mock-extensions/README.md @@ -9,8 +9,9 @@ - Add the dependency. ```xml + - org.apache.dubbo.extensions + org.apache.dubbo.gatewayorg.apache.dubbo.gateway dubbo-mock-admin 3.0.0 diff --git a/dubbo-mock-extensions/README_ch.md b/dubbo-mock-extensions/README_ch.md index e1d2af8b..7aa6f44b 100644 --- a/dubbo-mock-extensions/README_ch.md +++ b/dubbo-mock-extensions/README_ch.md @@ -9,8 +9,9 @@ - 引入依赖 ```xml + - org.apache.dubbo.extensions + org.apache.dubbo.gatewayorg.apache.dubbo.gateway dubbo-mock-admin 3.0.0 diff --git a/pom.xml b/pom.xml index eb91379f..734d33a6 100644 --- a/pom.xml +++ b/pom.xml @@ -94,10 +94,11 @@ dubbo-rpc-extensions dubbo-serialization-extensions dubbo-mock-extensions + dubbo-gateway-extensions - 1.0.4-SNAPSHOT + 1.0.5-SNAPSHOT 5.6.0 3.11.1 diff --git a/test/scenarios/scenarios-dubbo-serialization/dubbo-serialization-avro-test/pom.xml b/test/scenarios/scenarios-dubbo-serialization/dubbo-serialization-avro-test/pom.xml index 3962b882..a22b80f3 100644 --- a/test/scenarios/scenarios-dubbo-serialization/dubbo-serialization-avro-test/pom.xml +++ b/test/scenarios/scenarios-dubbo-serialization/dubbo-serialization-avro-test/pom.xml @@ -31,7 +31,7 @@ 3.0.4 4.13.1 4.3.29.RELEASE - 1.0.1-SNAPSHOT + 1.0.2-SNAPSHOT 3.7.0 diff --git a/test/scenarios/scenarios-dubbo-serialization/dubbo-serialization-fastjson-test/pom.xml b/test/scenarios/scenarios-dubbo-serialization/dubbo-serialization-fastjson-test/pom.xml index 89d2a7cd..f20a0233 100644 --- a/test/scenarios/scenarios-dubbo-serialization/dubbo-serialization-fastjson-test/pom.xml +++ b/test/scenarios/scenarios-dubbo-serialization/dubbo-serialization-fastjson-test/pom.xml @@ -32,7 +32,7 @@ 3.0.4 4.13.1 4.3.29.RELEASE - 1.0.1-SNAPSHOT + 1.0.2-SNAPSHOT 3.7.0 diff --git a/test/scenarios/scenarios-dubbo-serialization/dubbo-serialization-fst-test/pom.xml b/test/scenarios/scenarios-dubbo-serialization/dubbo-serialization-fst-test/pom.xml index b63a5853..89977f14 100644 --- a/test/scenarios/scenarios-dubbo-serialization/dubbo-serialization-fst-test/pom.xml +++ b/test/scenarios/scenarios-dubbo-serialization/dubbo-serialization-fst-test/pom.xml @@ -32,7 +32,7 @@ 3.0.4 4.13.1 4.3.29.RELEASE - 1.0.1-SNAPSHOT + 1.0.2-SNAPSHOT 3.7.0 diff --git a/test/scenarios/scenarios-dubbo-serialization/dubbo-serialization-gson-test/pom.xml b/test/scenarios/scenarios-dubbo-serialization/dubbo-serialization-gson-test/pom.xml index 3bad54da..67148472 100644 --- a/test/scenarios/scenarios-dubbo-serialization/dubbo-serialization-gson-test/pom.xml +++ b/test/scenarios/scenarios-dubbo-serialization/dubbo-serialization-gson-test/pom.xml @@ -32,7 +32,7 @@ 3.0.4 4.13.1 4.3.29.RELEASE - 1.0.1-SNAPSHOT + 1.0.2-SNAPSHOT 3.7.0 diff --git a/test/scenarios/scenarios-dubbo-serialization/dubbo-serialization-kryo-test/pom.xml b/test/scenarios/scenarios-dubbo-serialization/dubbo-serialization-kryo-test/pom.xml index be0db1ca..430f1c09 100644 --- a/test/scenarios/scenarios-dubbo-serialization/dubbo-serialization-kryo-test/pom.xml +++ b/test/scenarios/scenarios-dubbo-serialization/dubbo-serialization-kryo-test/pom.xml @@ -32,8 +32,8 @@ 3.0.4 4.13.1 4.3.29.RELEASE - 1.0.3-SNAPSHOT - 1.0.1-SNAPSHOT + 1.0.5-SNAPSHOT + 1.0.2-SNAPSHOT 3.7.0 diff --git a/test/scenarios/scenarios-dubbo-serialization/dubbo-serialization-protobuf-test/pom.xml b/test/scenarios/scenarios-dubbo-serialization/dubbo-serialization-protobuf-test/pom.xml index d12cc73b..0378770e 100644 --- a/test/scenarios/scenarios-dubbo-serialization/dubbo-serialization-protobuf-test/pom.xml +++ b/test/scenarios/scenarios-dubbo-serialization/dubbo-serialization-protobuf-test/pom.xml @@ -33,7 +33,7 @@ 4.13.1 4.3.29.RELEASE 0.0.2 - 1.0.1-SNAPSHOT + 1.0.2-SNAPSHOT 3.7.0 diff --git a/test/scenarios/scenarios-dubbo-serialization/dubbo-serialization-protostuff-test/pom.xml b/test/scenarios/scenarios-dubbo-serialization/dubbo-serialization-protostuff-test/pom.xml index b15af1bc..cff199ba 100644 --- a/test/scenarios/scenarios-dubbo-serialization/dubbo-serialization-protostuff-test/pom.xml +++ b/test/scenarios/scenarios-dubbo-serialization/dubbo-serialization-protostuff-test/pom.xml @@ -32,7 +32,7 @@ 3.0.4 4.13.1 4.3.29.RELEASE - 1.0.1-SNAPSHOT + 1.0.2-SNAPSHOT 3.7.0