From the course: Complete Guide to Spring MVC
Unlock this course with a free trial
Join today to access over 24,600 courses taught by industry experts.
HandlerFunction: Handler classes - Spring Tutorial
From the course: Complete Guide to Spring MVC
HandlerFunction: Handler classes
- [Instructor] Handler function, handler classes. We've learned about handler functions and we see how they differ from the annotation-based methods in Spring MVC. So now where do our handler functions go? They go inside of a handler class. Handler functions are used within handler classes to encapsulate that business logic, similar to how a controller and request mapping work in the traditional Spring MVC model. I've put together here a UML style diagram illustrating the relationship between a handler class, which I call HelloHandler and its handler functions which are handleGreeting and handleFarewell. And then we also have a router class, which we will call HelloRouter, which maps routes to these functions. The color-coded blocks indicate the following. The blue represent the classes, so HelloHandler and HelloRouter. The green represent individual handler functions within the handler class. And then the yellow blocks represent the routes defined in the router class that map 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)
Functional endpoints overview3m 58s
-
HandlerFunction overview6m 12s
-
(Locked)
HandlerFunction: ServerRequest & ServerResponse7m 9s
-
(Locked)
HandlerFunction: Handler classes6m 49s
-
(Locked)
HandlerFunction: Validation5m 45s
-
(Locked)
RouterFunctions and routing5m 7s
-
(Locked)
Serving static resources4m 30s
-
(Locked)
Running a server6m 10s
-
(Locked)
Filtering handler functions5m 50s
-
(Locked)
-
-
-
-
-
-
-
-
-
-