I have a controller that extends the MultiActionController and that does not use annotation. Everything is configured by xml.
Is there a way to reproduce this method in a MultiActionController?
@RequestMapping(value = "/products", method = RequestMethod.GET)
public @ResponseBody List<Product> products() {
return product.getList();
}
The problem I'm facing is how to return the list in the @ResponeBody.
My methods looks like these:
public ModelAndView login(HttpServletRequest request,HttpServletResponse response) throws ServletRequestBindingException {
return new ModelAndView("login", model);
}