Example 3

In the following example, there are two RequestMapping methods--one in the class and the other in the method. A combination of both RequestMapping methods is used to determine the URI. The showPage method will be mapped only to the GET request for the URI /user/show-page:

    @Controller 
@RequestMapping("/user")
public class UserController {
@RequestMapping(value = "/show-page" , method =
RequestMethod.GET)
public String showPage() {
/* Some code */
}
}
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset