Example 2

In the following example, there is a method defined on RequestMappingRequestMethod.GET. The showPage method will be mapped only to the GET request for the /show-page URI. All other request method types would throw a method not supported exception:

    @Controller 
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