Can I do the following in Spring MVC
Suppose I have the Base GenericController as follows with one request mapping "/list"
@Controller
public class GenericController<T>{
@RequestMapping(method = RequestMethod.GET, value = "/list")
public @ResponseBody List<T> getMyPage(){
// returns list of T
}
}
Below are my two controllers
@Controller(value = "/page1")
public class Page1Controller extends GenericController<Page1>{
}
@Controller(value = "/page2")
public class Page2Controller extends GenericController<Page2>{
}
Now will i be able to access the url "/page1/list" and "/page2/list" where first goes to Page1Controller and second goes to Page2Controller.