update witness class in springmvc-annotation-5.x-plugin (#571)

Co-authored-by: 熊哲源 <xiongzheyuan@shouqianba.com>
This commit is contained in:
xzyJavaX 2023-07-07 17:31:36 +08:00 committed by GitHub
parent b9075ce7ad
commit 6229b22a8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 6 deletions

View File

@ -11,6 +11,7 @@ Release Notes.
* Implement new naming policies for names of auxiliary type, interceptor delegate field, renamed origin method, method
access name, method cache value field. All names are under `sw$` name trait. They are predictable and unchanged after
re-transform.
* Fix witness class in springmvc-annotation-5.x-plugin to avoid falling into v3 use cases.
```
* SWAuxiliaryTypeNamingStrategy

View File

@ -20,10 +20,11 @@ package org.apache.skywalking.apm.plugin.spring.mvc.v5.define;
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
public abstract class AbstractSpring5Instrumentation extends ClassInstanceMethodsEnhancePluginDefine {
public static final String WITNESS_CLASSES = "org.springframework.beans.annotation.AnnotationBeanUtils";
public static final String WITNESS_CLASSES_LOW_VERSION = "org.springframework.beans.annotation.AnnotationBeanUtils";
public static final String WITNESS_CLASSES_HIGH_VERSION = "org.springframework.core.ReactiveAdapterRegistry";
@Override
protected final String[] witnessClasses() {
return new String[] {WITNESS_CLASSES};
return new String[] {WITNESS_CLASSES_LOW_VERSION, WITNESS_CLASSES_HIGH_VERSION};
}
}

View File

@ -20,10 +20,11 @@ package org.apache.skywalking.apm.plugin.spring.mvc.v5.define.reactive;
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
public abstract class AbstractSpring5ReactiveInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {
public static final String WITNESS_CLASSES = "org.springframework.beans.annotation.AnnotationBeanUtils";
public static final String WITNESS_CLASSES_LOW_VERSION = "org.springframework.beans.annotation.AnnotationBeanUtils";
public static final String WITNESS_CLASSES_HIGH_VERSION = "org.springframework.core.ReactiveAdapterRegistry";
@Override
protected final String[] witnessClasses() {
return new String[] {WITNESS_CLASSES};
return new String[] {WITNESS_CLASSES_LOW_VERSION, WITNESS_CLASSES_HIGH_VERSION};
}
}

View File

@ -20,10 +20,11 @@ package org.apache.skywalking.apm.plugin.spring.mvc.v5.define.reactive;
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.v2.ClassInstanceMethodsEnhancePluginDefineV2;
public abstract class AbstractSpring5ReactiveInstrumentationV2 extends ClassInstanceMethodsEnhancePluginDefineV2 {
public static final String WITNESS_CLASSES = "org.springframework.beans.annotation.AnnotationBeanUtils";
public static final String WITNESS_CLASSES_LOW_VERSION = "org.springframework.beans.annotation.AnnotationBeanUtils";
public static final String WITNESS_CLASSES_HIGH_VERSION = "org.springframework.core.ReactiveAdapterRegistry";
@Override
protected final String[] witnessClasses() {
return new String[] {WITNESS_CLASSES};
return new String[] {WITNESS_CLASSES_LOW_VERSION, WITNESS_CLASSES_HIGH_VERSION};
}
}