From the course: Complete Guide to Spring MVC
Unlock this course with a free trial
Join today to access over 24,700 courses taught by industry experts.
Mapping requests overview - Spring Tutorial
From the course: Complete Guide to Spring MVC
Mapping requests overview
- [Instructor] Mapping requests overview. Request mapping in Spring MVC refers to the process of associating incoming HTTP requests with specific controller methods. This allows your application to handle different types of requests and route them to the appropriate handlers. So as we've seen in our previous examples, some common HTTP methods that Spring MVC provides shortcut annotations for are the get, post, put, delete, and patch mapping. These annotations are equivalent to using @RequestMapping with the corresponding HTTP method. The @RequestMapping annotation is the primary mechanism for mapping requests to controller methods in Spring MVC. It provides various attributes to match requests based on a few number of things. I'll start off with URL patterns. So it matches specific URLs or patterns. In the example here, the value attribute specifies the URL or URL pattern that the method handles. For example, the hello maps to the sayHello method. The next attribute would be HTTP…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Declaration overview4m 32s
-
(Locked)
Declaration: AOP proxies6m 23s
-
(Locked)
Mapping requests overview5m 19s
-
Mapping requests: URI patterns5m 50s
-
(Locked)
Mapping requests: Consumable media types4m
-
(Locked)
Mapping requests: Producible media types3m 53s
-
(Locked)
Handler methods overview3m 9s
-
(Locked)
Handler methods: Method arguments2m 54s
-
(Locked)
Handler methods: Return values5m 2s
-
(Locked)
Handler methods: Type conversion4m 47s
-
(Locked)
Model3m 16s
-
(Locked)
@InitBinder overview7m 46s
-
(Locked)
Validation3m 33s
-
(Locked)
Exceptions overview4m 39s
-
(Locked)
Exceptions: Method arguments3m 56s
-
(Locked)
Exceptions: Return values6m 47s
-
(Locked)
Controller advice10m 32s
-
(Locked)
-
-
-
-
-
-
-
-
-
-
-