天天看點

RestController 與Controller 在視圖 對比不同

首先RestController  

@RequestMapping("/file")

public ModelAndView showfile() {

ModelAndView mv = new ModelAndView("file");

return mv;

}

而Controller 

@RequestMapping(value = "/", method = RequestMethod.GET)

public String index() {

return "index";

}