From 0df5491902e5d7d2b038464aa02ecd36e122d7f7 Mon Sep 17 00:00:00 2001 From: Rocky Yu Date: Wed, 30 Nov 2022 14:58:18 +0800 Subject: [PATCH] fix remote invoke bug --- lattice-model/pom.xml | 2 +- .../java/org/hiforce/lattice/utils/BusinessExtUtils.java | 4 +++- lattice-remote/lattice-remote-client/pom.xml | 2 +- lattice-remote/lattice-remote-container/pom.xml | 2 +- .../remote/container/service/LatticeRemoteInvokerImpl.java | 5 ++++- .../lattice-remote-runner-dubbo/pom.xml | 2 +- lattice-remote/lattice-remote-runner/pom.xml | 2 +- lattice-remote/pom.xml | 2 +- lattice-runtime/pom.xml | 2 +- lattice-tools/lattice-dynamic-loading/pom.xml | 2 +- lattice-tools/lattice-load-config-res/pom.xml | 2 +- .../lattice-maven-build/lattice-maven-build-model/pom.xml | 2 +- .../lattice-maven-build/lattice-maven-build-plugin/pom.xml | 2 +- lattice-tools/lattice-maven-build/pom.xml | 2 +- lattice-tools/pom.xml | 2 +- pom.xml | 4 ++-- 16 files changed, 22 insertions(+), 17 deletions(-) diff --git a/lattice-model/pom.xml b/lattice-model/pom.xml index b586e439..487d528b 100644 --- a/lattice-model/pom.xml +++ b/lattice-model/pom.xml @@ -5,7 +5,7 @@ lattice org.hiforce.lattice - 1.0.12.3 + 1.0.13 4.0.0 lattice-model diff --git a/lattice-model/src/main/java/org/hiforce/lattice/utils/BusinessExtUtils.java b/lattice-model/src/main/java/org/hiforce/lattice/utils/BusinessExtUtils.java index f3c12712..b5322bfc 100644 --- a/lattice-model/src/main/java/org/hiforce/lattice/utils/BusinessExtUtils.java +++ b/lattice-model/src/main/java/org/hiforce/lattice/utils/BusinessExtUtils.java @@ -6,6 +6,7 @@ import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.reflect.MethodUtils; import org.hiforce.lattice.annotation.model.ExtensionAnnotation; import org.hiforce.lattice.model.ability.IBusinessExt; @@ -58,7 +59,8 @@ public static Set supportedExtCodes(IBusinessExt businessExt) { continue; } if (StringUtils.isNotEmpty(annotation.getCode())) { - EXT_METHOD_MAP.put(key, annotation.getCode(), method); + EXT_METHOD_MAP.put(key, annotation.getCode(), + MethodUtils.getAccessibleMethod(method)); supportedCodes.add(annotation.getCode()); } diff --git a/lattice-remote/lattice-remote-client/pom.xml b/lattice-remote/lattice-remote-client/pom.xml index 49b37712..844c2706 100644 --- a/lattice-remote/lattice-remote-client/pom.xml +++ b/lattice-remote/lattice-remote-client/pom.xml @@ -5,7 +5,7 @@ lattice-remote org.hiforce.lattice - 1.0.12.3 + 1.0.13 4.0.0 diff --git a/lattice-remote/lattice-remote-container/pom.xml b/lattice-remote/lattice-remote-container/pom.xml index fef81002..609f7a2a 100644 --- a/lattice-remote/lattice-remote-container/pom.xml +++ b/lattice-remote/lattice-remote-container/pom.xml @@ -5,7 +5,7 @@ lattice-remote org.hiforce.lattice - 1.0.12.3 + 1.0.13 4.0.0 diff --git a/lattice-remote/lattice-remote-container/src/main/java/org/hiforce/lattice/remote/container/service/LatticeRemoteInvokerImpl.java b/lattice-remote/lattice-remote-container/src/main/java/org/hiforce/lattice/remote/container/service/LatticeRemoteInvokerImpl.java index 24c5ff5a..00c1ed50 100644 --- a/lattice-remote/lattice-remote-container/src/main/java/org/hiforce/lattice/remote/container/service/LatticeRemoteInvokerImpl.java +++ b/lattice-remote/lattice-remote-container/src/main/java/org/hiforce/lattice/remote/container/service/LatticeRemoteInvokerImpl.java @@ -1,6 +1,8 @@ package org.hiforce.lattice.remote.container.service; +import org.apache.commons.beanutils.MethodUtils; import org.apache.commons.lang3.StringUtils; +import org.hiforce.lattice.model.ability.IBusinessExt; import org.hiforce.lattice.model.register.RealizationSpec; import org.hiforce.lattice.remote.client.LatticeRemoteInvoker; import org.hiforce.lattice.runtime.Lattice; @@ -26,8 +28,9 @@ public Serializable invoke(String bizCode, String scenario, String extCode, Obje if (null == realizationSpec) { return null; } - Method method = BusinessExtUtils.getExtensionMethod(realizationSpec.getBusinessExt(), extCode, scenario); try { + IBusinessExt businessExt = realizationSpec.getBusinessExt().getBusinessExtByCode(extCode, scenario); + Method method = BusinessExtUtils.getExtensionMethod(businessExt, extCode, scenario); return (Serializable) method.invoke(realizationSpec.getBusinessExt(), params); } catch (Exception e) { throw new RuntimeException(e); diff --git a/lattice-remote/lattice-remote-runner/lattice-remote-runner-dubbo/pom.xml b/lattice-remote/lattice-remote-runner/lattice-remote-runner-dubbo/pom.xml index f8e91d40..b99f9acf 100644 --- a/lattice-remote/lattice-remote-runner/lattice-remote-runner-dubbo/pom.xml +++ b/lattice-remote/lattice-remote-runner/lattice-remote-runner-dubbo/pom.xml @@ -5,7 +5,7 @@ lattice-remote-runner org.hiforce.lattice - 1.0.12.3 + 1.0.13 4.0.0 diff --git a/lattice-remote/lattice-remote-runner/pom.xml b/lattice-remote/lattice-remote-runner/pom.xml index f7dd246a..09f602c1 100644 --- a/lattice-remote/lattice-remote-runner/pom.xml +++ b/lattice-remote/lattice-remote-runner/pom.xml @@ -5,7 +5,7 @@ lattice-remote org.hiforce.lattice - 1.0.12.3 + 1.0.13 4.0.0 diff --git a/lattice-remote/pom.xml b/lattice-remote/pom.xml index 59972d82..24be5196 100644 --- a/lattice-remote/pom.xml +++ b/lattice-remote/pom.xml @@ -5,7 +5,7 @@ lattice org.hiforce.lattice - 1.0.12.3 + 1.0.13 4.0.0 diff --git a/lattice-runtime/pom.xml b/lattice-runtime/pom.xml index 0aefac90..d332995d 100644 --- a/lattice-runtime/pom.xml +++ b/lattice-runtime/pom.xml @@ -5,7 +5,7 @@ lattice org.hiforce.lattice - 1.0.12.3 + 1.0.13 4.0.0 diff --git a/lattice-tools/lattice-dynamic-loading/pom.xml b/lattice-tools/lattice-dynamic-loading/pom.xml index e20fed20..af7d03a8 100644 --- a/lattice-tools/lattice-dynamic-loading/pom.xml +++ b/lattice-tools/lattice-dynamic-loading/pom.xml @@ -5,7 +5,7 @@ lattice-tools org.hiforce.lattice - 1.0.12.3 + 1.0.13 4.0.0 diff --git a/lattice-tools/lattice-load-config-res/pom.xml b/lattice-tools/lattice-load-config-res/pom.xml index 2d2d94d7..50bf79a3 100644 --- a/lattice-tools/lattice-load-config-res/pom.xml +++ b/lattice-tools/lattice-load-config-res/pom.xml @@ -5,7 +5,7 @@ lattice-tools org.hiforce.lattice - 1.0.12.3 + 1.0.13 4.0.0 diff --git a/lattice-tools/lattice-maven-build/lattice-maven-build-model/pom.xml b/lattice-tools/lattice-maven-build/lattice-maven-build-model/pom.xml index 1fc75f75..ea828128 100644 --- a/lattice-tools/lattice-maven-build/lattice-maven-build-model/pom.xml +++ b/lattice-tools/lattice-maven-build/lattice-maven-build-model/pom.xml @@ -5,7 +5,7 @@ lattice-maven-build org.hiforce.lattice - 1.0.12.3 + 1.0.13 4.0.0 diff --git a/lattice-tools/lattice-maven-build/lattice-maven-build-plugin/pom.xml b/lattice-tools/lattice-maven-build/lattice-maven-build-plugin/pom.xml index f6ea3f41..7c1ec6e9 100644 --- a/lattice-tools/lattice-maven-build/lattice-maven-build-plugin/pom.xml +++ b/lattice-tools/lattice-maven-build/lattice-maven-build-plugin/pom.xml @@ -5,7 +5,7 @@ lattice-maven-build org.hiforce.lattice - 1.0.12.3 + 1.0.13 4.0.0 maven-plugin diff --git a/lattice-tools/lattice-maven-build/pom.xml b/lattice-tools/lattice-maven-build/pom.xml index 3e934c9e..7a6e372b 100644 --- a/lattice-tools/lattice-maven-build/pom.xml +++ b/lattice-tools/lattice-maven-build/pom.xml @@ -5,7 +5,7 @@ lattice-tools org.hiforce.lattice - 1.0.12.3 + 1.0.13 4.0.0 pom diff --git a/lattice-tools/pom.xml b/lattice-tools/pom.xml index bb02740e..f739b49b 100644 --- a/lattice-tools/pom.xml +++ b/lattice-tools/pom.xml @@ -5,7 +5,7 @@ lattice org.hiforce.lattice - 1.0.12.3 + 1.0.13 4.0.0 pom diff --git a/pom.xml b/pom.xml index c698736a..bc49de6b 100644 --- a/pom.xml +++ b/pom.xml @@ -16,9 +16,9 @@ https://github.com/hiforce/lattice 2022 - 1.0.12.3 + 1.0.13 - 1.0.12.3 + 1.0.13 5.3.23 2.7.4 1.2