Skip to content

Commit f0a826e

Browse files
committed
AbstractHandlerMethodMapping adds type+method info to getMappingForMethod exceptions
Issue: SPR-14452 (cherry picked from commit 8ccd727)
1 parent 5c3c0f7 commit f0a826e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMethodMapping.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,13 @@ protected void detectHandlerMethods(final Object handler) {
231231
new MethodIntrospector.MetadataLookup<T>() {
232232
@Override
233233
public T inspect(Method method) {
234-
return getMappingForMethod(method, userType);
234+
try {
235+
return getMappingForMethod(method, userType);
236+
}
237+
catch (Throwable ex) {
238+
throw new IllegalStateException("Invalid mapping on handler class [" +
239+
userType.getName() + "]: " + method, ex);
240+
}
235241
}
236242
});
237243

0 commit comments

Comments
 (0)