You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2021/03/28 15:32:52 UTC

[skywalking] branch master updated: Fixbug/springmvn-annotation-4.x-plugin, witness class does not exist in some versions (#6629)

This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking.git


The following commit(s) were added to refs/heads/master by this push:
     new 0047829  Fixbug/springmvn-annotation-4.x-plugin, witness class does not exist in some versions (#6629)
0047829 is described below

commit 0047829b9f27a9c7c838b3c57760237cdb00263a
Author: 李文广 <li...@163.com>
AuthorDate: Sun Mar 28 23:32:31 2021 +0800

    Fixbug/springmvn-annotation-4.x-plugin, witness class does not exist in some versions (#6629)
---
 CHANGES.md                                                              | 1 +
 .../spring/mvc/v4/define/ControllerForLowVersionInstrumentation.java    | 2 +-
 .../mvc/v4/define/RestControllerForLowVersionInstrumentation.java       | 2 +-
 test/plugin/scenarios/spring-4.3.x-scenario/support-version.list        | 2 ++
 4 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/CHANGES.md b/CHANGES.md
index 09d958f..a464a65 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -25,6 +25,7 @@ Release Notes.
 * Support jedis pipeline in jedis-2.x-plugin.
 * Fix apm-toolkit-log4j-2.x-activation no trace Id in async log.
 * Replace hbase-1.x-plugin with hbase-1.x-2.x-plugin to adapt hbase client 2.x
+* Fix bug that springmvn-annotation-4.x-plugin, witness class does not exist in some versions.
 
 #### OAP-Backend
 * Allow user-defined `JAVA_OPTS` in the startup script.
diff --git a/apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/mvc/v4/define/ControllerForLowVersionInstrumentation.java b/apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/mvc/v4/define/ControllerForLowVersionInstrumentation.java
index 81b5778..c27cfc8 100644
--- a/apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/mvc/v4/define/ControllerForLowVersionInstrumentation.java
+++ b/apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/mvc/v4/define/ControllerForLowVersionInstrumentation.java
@@ -25,7 +25,7 @@ import org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterc
 import static net.bytebuddy.matcher.ElementMatchers.any;
 
 public class ControllerForLowVersionInstrumentation extends AbstractControllerInstrumentation {
-    public static final String WITNESS_CLASSES_LOW_VERSION = "org.springframework.web.context.support.ServletContextPropertyPlaceholderConfigurer";
+    public static final String WITNESS_CLASSES_LOW_VERSION = "org.springframework.web.method.HandlerMethodSelector";
 
     public static final String ENHANCE_ANNOTATION = "org.springframework.stereotype.Controller";
 
diff --git a/apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/mvc/v4/define/RestControllerForLowVersionInstrumentation.java b/apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/mvc/v4/define/RestControllerForLowVersionInstrumentation.java
index 97863ec..55e62ec 100644
--- a/apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/mvc/v4/define/RestControllerForLowVersionInstrumentation.java
+++ b/apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/mvc/v4/define/RestControllerForLowVersionInstrumentation.java
@@ -25,7 +25,7 @@ import org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterc
 import static net.bytebuddy.matcher.ElementMatchers.any;
 
 public class RestControllerForLowVersionInstrumentation extends AbstractControllerInstrumentation {
-    public static final String WITNESS_CLASSES_LOW_VERSION = "org.springframework.web.context.support.ServletContextPropertyPlaceholderConfigurer";
+    public static final String WITNESS_CLASSES_LOW_VERSION = "org.springframework.web.method.HandlerMethodSelector";
 
     public static final String ENHANCE_ANNOTATION = "org.springframework.web.bind.annotation.RestController";
 
diff --git a/test/plugin/scenarios/spring-4.3.x-scenario/support-version.list b/test/plugin/scenarios/spring-4.3.x-scenario/support-version.list
index 02096a6..48d635b 100644
--- a/test/plugin/scenarios/spring-4.3.x-scenario/support-version.list
+++ b/test/plugin/scenarios/spring-4.3.x-scenario/support-version.list
@@ -14,6 +14,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+4.3.16.RELEASE
+4.3.24.RELEASE
 4.3.25.RELEASE
 5.0.15.RELEASE
 5.1.10.RELEASE