Skip to content

Commit 8ccd727

Browse files
committed
AbstractHandlerMethodMapping adds type+method info to getMappingForMethod exceptions
Issue: SPR-14452
1 parent 84afc60 commit 8ccd727

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+
handlerType.getName() + "]: " + method, ex);
240+
}
235241
}
236242
});
237243

0 commit comments

Comments
 (0)