提交 e51abb30 编写于 作者: wu-sheng's avatar wu-sheng 提交者: GitHub

Merge pull request #470 from ascrutae/fix/spring-annotation-issue

fix the operation name of spring mvc span is incorrect
......@@ -24,7 +24,11 @@ public class ControllerConstructorInterceptor implements InstanceConstructorInte
String basePath = "";
RequestMapping basePathRequestMapping = objInst.getClass().getAnnotation(RequestMapping.class);
if (basePathRequestMapping != null) {
basePath = basePathRequestMapping.value()[0];
if (basePathRequestMapping.value().length > 0) {
basePath = basePathRequestMapping.value()[0];
} else if (basePathRequestMapping.path().length > 0) {
basePath = basePathRequestMapping.path()[0];
}
}
PathMappingCache pathMappingCache = new PathMappingCache(basePath);
objInst.setSkyWalkingDynamicField(pathMappingCache);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册