Skip to content

Commit

Permalink
Fix NoSuchMethodError in mvc-annotation-commons&change deprecated met…
Browse files Browse the repository at this point in the history
…hod (#658)
  • Loading branch information
CzyerChen authored Dec 15, 2023
1 parent 045c1e7 commit fdc1e97
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 10 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Release Notes.
9.2.0
------------------

* Fix NoSuchMethodError in mvc-annotation-commons and change deprecated method


#### Documentation

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,11 @@ public void beforeMethod(EnhancedInstance objInst, Method method, Object[] allAr
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);

Expand Down
23 changes: 15 additions & 8 deletions test/plugin/scenarios/spring-6.x-scenario/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>

Expand All @@ -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>
Expand All @@ -119,4 +126,4 @@
<url>https://repo.spring.io/milestone</url>
</pluginRepository>
</pluginRepositories>
</project>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
# limitations under the License.

6.0.4
6.1.0
6.1.1

0 comments on commit fdc1e97

Please sign in to comment.