diff --git a/CHANGES.md b/CHANGES.md index 09d958f87..a464a654f 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 81b57780f..c27cfc860 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 97863ec69..55e62ec55 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 02096a625..48d635b04 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