This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-java.git
The following commit(s) were added to refs/heads/main by this push:
new fdc1e97c48 Fix NoSuchMethodError in mvc-annotation-commons&change
deprecated method (#658)
fdc1e97c48 is described below
commit fdc1e97c481e8660b35f9850c4d846808b85443d
Author: Chen Ziyan <[email protected]>
AuthorDate: Fri Dec 15 14:45:18 2023 +0800
Fix NoSuchMethodError in mvc-annotation-commons&change deprecated method
(#658)
---
CHANGES.md | 2 ++
.../interceptor/AbstractMethodInterceptor.java | 4 ++--
test/plugin/scenarios/spring-6.x-scenario/pom.xml | 23 ++++++++++++++--------
.../spring-6.x-scenario/support-version.list | 2 ++
4 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/CHANGES.md b/CHANGES.md
index 0029a64980..f0a91e54cd 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -5,6 +5,8 @@ Release Notes.
9.2.0
------------------
+* Fix NoSuchMethodError in mvc-annotation-commons and change deprecated method
+
#### Documentation
diff --git
a/apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-commons/src/main/java/org/apache/skywalking/apm/plugin/spring/mvc/commons/interceptor/AbstractMethodInterceptor.java
b/apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-commons/src/main/java/org/apache/skywalking/apm/plugin/spring/mvc/commons/interceptor/AbstractMethodInterceptor.java
index c086f68862..df3aa7583f 100644
---
a/apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-commons/src/main/java/org/apache/skywalking/apm/plugin/spring/mvc/commons/interceptor/AbstractMethodInterceptor.java
+++
b/apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-commons/src/main/java/org/apache/skywalking/apm/plugin/spring/mvc/commons/interceptor/AbstractMethodInterceptor.java
@@ -168,11 +168,11 @@ public abstract class AbstractMethodInterceptor
implements InstanceMethodsAround
next.setHeadValue(serverHttpRequest.getHeaders().getFirst(next.getHeadKey()));
}
- String operationName = this.buildOperationName(method,
serverHttpRequest.getMethodValue(),
+ String operationName = this.buildOperationName(method,
serverHttpRequest.getMethod().name(),
(EnhanceRequireObjectCache) objInst.getSkyWalkingDynamicField());
AbstractSpan span =
ContextManager.createEntrySpan(operationName, contextCarrier);
Tags.URL.set(span, serverHttpRequest.getURI().toString());
- Tags.HTTP.METHOD.set(span,
serverHttpRequest.getMethodValue());
+ Tags.HTTP.METHOD.set(span,
serverHttpRequest.getMethod().name());
span.setComponent(ComponentsDefine.SPRING_MVC_ANNOTATION);
SpanLayer.asHttp(span);
diff --git a/test/plugin/scenarios/spring-6.x-scenario/pom.xml
b/test/plugin/scenarios/spring-6.x-scenario/pom.xml
index 8d07f23277..7fde18e1bb 100644
--- a/test/plugin/scenarios/spring-6.x-scenario/pom.xml
+++ b/test/plugin/scenarios/spring-6.x-scenario/pom.xml
@@ -29,8 +29,8 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <compiler.version>1.8</compiler.version>
- <maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
+ <compiler.version>17</compiler.version>
+ <maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
<test.framework.version>6.0.0</test.framework.version>
<test.framework>spring</test.framework>
</properties>
@@ -62,30 +62,36 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
- <version>2.9.3</version>
+ <version>2.14.3</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
- <version>2.8.2</version>
+ <version>2.9.1</version>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
- <version>3.0.0</version>
+ <version>4.10.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
- <version>2.8.1</version>
+ <version>2.19.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
- <version>2.8.1</version>
+ <version>2.19.0</version>
+ </dependency>
+
+ <dependency>
+ <groupId>jakarta.servlet</groupId>
+ <artifactId>jakarta.servlet-api</artifactId>
+ <version>6.0.0</version>
</dependency>
</dependencies>
@@ -101,6 +107,7 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
+ <parameters>true</parameters>
<source>${compiler.version}</source>
<target>${compiler.version}</target>
<encoding>${project.build.sourceEncoding}</encoding>
@@ -119,4 +126,4 @@
<url>https://repo.spring.io/milestone</url>
</pluginRepository>
</pluginRepositories>
-</project>
+</project>
\ No newline at end of file
diff --git a/test/plugin/scenarios/spring-6.x-scenario/support-version.list
b/test/plugin/scenarios/spring-6.x-scenario/support-version.list
index 3c4d8d425d..c96f0b4304 100644
--- a/test/plugin/scenarios/spring-6.x-scenario/support-version.list
+++ b/test/plugin/scenarios/spring-6.x-scenario/support-version.list
@@ -15,3 +15,5 @@
# limitations under the License.
6.0.4
+6.1.0
+6.1.1