Questions |
Answers |
If you imagine a web application called Library with the following request mapping on a Controller class level and in the method level, which is the appropriate request URL to map the request to the @RequestMapping("/books") public class BookController { ... @RequestMapping(value = "/list") public String books(Model model) { ... |
1. |
Similarly, suppose we have another handler method called @RequestMapping public String details(Model model) { ... |
2. |
If we have a web application called @RequestMapping("/items") public class ProductController { ... @RequestMapping(value = "/type/{type}", method = RequestMethod.GET) public String productDetails(@PathVariable("type") String productType, Model model) { |
2. |
For the following request mapping annotation, which are the correct methods' signatures to retrieve the path variables? @RequestMapping(value="/manufacturer/{ manufacturerId}/product/{productId}") |
1.
4. |
For the following request mapping method signature, which is the appropriate request URL? @RequestMapping(value = "/products", method = RequestMethod.GET) public String productDetails(@RequestParam String rate, Model model) |
2. |