標記了@RequestMapping 注解的方法,更改 url 的時候特別有用
目的:一個方法對應多個 url
改之前
@RequestMapping("")
public String index(HttpServletRequest request, Model model) { return "index" }
@RequestMapping("index")
public String index(HttpServletRequest request, Model model) { return "index" }
改之后 @RequestMapping(value={"index",""})
public String index(HttpServletRequest request, Model model) { return "index" }