#46 - AnnotationMappingDiscoverer now deals with missing method mapping.
If a method level @RequestMapping is not carrying a value we now fall back to the type level mapping as Spring MVC does. Before the fix, providing no mapping lead to an ArrayIndexOutOfBoundsException.
This commit is contained in:
committed by
Oliver Gierke
parent
1bd90991bd
commit
29b433445c
@@ -88,6 +88,11 @@ public class AnnotationMappingDiscoverer implements MappingDiscoverer {
|
||||
}
|
||||
|
||||
String typeMapping = getMapping(method.getDeclaringClass());
|
||||
|
||||
if (mapping == null || mapping.length == 0) {
|
||||
return typeMapping;
|
||||
}
|
||||
|
||||
return typeMapping == null ? mapping[0] : typeMapping + mapping[0];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user