Я получил класс public class WebRequestViewController, расширяющий AbstractController с переопределенным методом
Код: Выделить всё
@Override
protected final ModelAndView handleRequestInternal(HttpServletRequest httpRequest, HttpServletResponse httpResponse) {
try {
final WebRequest webRequest = new WebRequest(httpRequest);
final SpringPropertyMessageLookup messageLookup = new SpringPropertyMessageLookup(getApplicationContext(), httpRequest.getLocale(),
"comp");
final ModelAndView modelAndView = new ModelAndView(webRequestHandler.getViewName());
webRequestHandler.handleWebRequest(webRequest, modelAndView.getModel(), messageLookup);
return modelAndView;
} catch (Exception e) {
throw new RuntimeException("Exception for [" + webRequestHandler + "]", e);
}
}
Я добавил аннотацию для класса RequestViewController:
Код: Выделить всё
@Controller
public class RequestViewController {
Подробнее здесь: https://stackoverflow.com/questions/790 ... n-spring-5
Мобильная версия