Use MessageSource in HandlerMethod for error reason

Closes gh-27156
This commit is contained in:
Rossen Stoyanchev
2021-07-13 19:38:24 +01:00
parent 33f3aa9b8a
commit bb816c123c
4 changed files with 78 additions and 4 deletions

View File

@@ -258,7 +258,9 @@ public abstract class AbstractHandlerMethodMapping<T> extends AbstractHandlerMap
protected HandlerMethod createHandlerMethod(Object handler, Method method) {
if (handler instanceof String) {
return new HandlerMethod((String) handler,
obtainApplicationContext().getAutowireCapableBeanFactory(), method);
obtainApplicationContext().getAutowireCapableBeanFactory(),
obtainApplicationContext(),
method);
}
return new HandlerMethod(handler, method);
}