Skip to content

Commit e417955

Browse files
committed
AbstractHandlerMethodMapping adds type+method info to getMappingForMethod exceptions
Issue: SPR-14452 (cherry picked from commit f0a826e)
1 parent 82ca201 commit e417955

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
@@ -230,7 +230,13 @@ protected void detectHandlerMethods(final Object handler) {
230230
new MethodIntrospector.MetadataLookup<T>() {
231231
@Override
232232
public T inspect(Method method) {
233-
return getMappingForMethod(method, userType);
233+
try {
234+
return getMappingForMethod(method, userType);
235+
}
236+
catch (Throwable ex) {
237+
throw new IllegalStateException("Invalid mapping on handler class [" +
238+
userType.getName() + "]: " + method, ex);
239+
}
234240
}
235241
});
236242

0 commit comments

Comments
 (0)