具体多种情况参考 https://blog.csdn.net/liming_0820/article/details/80878168
@RequestMapping("/login.html")
public ModelAndView login(){
List<Profession> list=ps.searchAll();
ModelAndView mav=new ModelAndView("login");
mav.addObject("Professions",list);
return mav;
}
@RequestMapping("/forget.html")
public String forget(){
return "forget";
}
ModelAndView mav=new ModelAndView("login"); login后面不能跟".html"
return "forget"; "forget" 前面不能加"/"