fix issue that the span operation name of spring mvc is null

This commit is contained in:
ascrutae 2017-09-25 15:45:11 +08:00
parent fd57c7ce41
commit 8968db0346
1 changed files with 2 additions and 0 deletions

View File

@ -30,6 +30,8 @@ public class ControllerServiceMethodInterceptor implements InstanceMethodsAround
RequestMapping methodRequestMapping = method.getAnnotation(RequestMapping.class);
if (methodRequestMapping.value().length > 0) {
requestURL = methodRequestMapping.value()[0];
} else if (methodRequestMapping.path().length > 0) {
requestURL = methodRequestMapping.path()[0];
} else {
requestURL = "";
}