天天看点

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";

}