Reputation: 36058
In my controller:
@RequestMapping(value = "/", method = RequestMethod.GET)
public String index() {
return "page/post/list";
}
I want url with pattern '/' or '/list' or '/index' are all handled by this method,is there any way to config it?
Upvotes: 2
Views: 437
Reputation: 4288
@RequestMapping(value = {"/", "/list", "/index"}, method = RequestMethod.GET)
public String index() {
return "page/post/list";
}
Upvotes: 3