Is there any difference between
public class Controller1 extends AbstractController {
@Override
protected ModelAndView handleRequestInternal(HttpServletRequest request,
HttpServletResponse response) throws Exception {
return new AnotherController().handleRequest(request, response);
}
}
and
@Controller
public class Controller1 {
@RequestMapping ...
public String handleRequest() {
return "forward:/path_to_my_another_controller";
}
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…