-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Describe the bug
When i tried to created a custom instrumentation for different springboot version. It will cause this bug: /Users/user/.gradle/caches/modules-2/files-2.1/org.springframework/spring-webmvc/6.0.15/bd96acb6a63c8fee3d7412082c27ab164294994f/spring-webmvc-6.0.15.jar(/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerMapping.class) warning: Cannot find annotation method 'since()' in type 'Deprecated'
Steps to reproduce
- create a custom instrumentation
- add dependency
compileOnly("org.springframework.boot:spring-boot-starter-web:3.1.7")and add this code to advice
ConfigurableApplicationContext context = (ConfigurableApplicationContext) result;
Map<?, ?> handlerMethods = context.getBean("requestMappingHandlerMapping",
RequestMappingHandlerMapping.class).getHandlerMethods();- run gradle assemble
Expected behavior
build successfully
Actual behavior
/Users/user/.gradle/caches/modules-2/files-2.1/org.springframework/spring-webmvc/6.0.15/bd96acb6a63c8fee3d7412082c27ab164294994f/spring-webmvc-6.0.15.jar(/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerMapping.class): warning: Cannot find annotation method 'since()' in type 'Deprecated'
error: warnings found and -Werror specified
1 error
1 warning
FAILURE: Build failed with an exception.
Javaagent or library instrumentation version
1.32.0
Environment
JDK: 17
OS: macos
Additional context
In spring 6.x, RequestMappingHandlerMapping used @Deprecated(since = "6.0"), "since" is since from jdk9. It seems that i used a class cannot be compiled with jdk8. Is there any suggestion for this?