From the course: Creating Spring Boot Microservices
Unlock the full course today
Join today to access over 24,400 courses taught by industry experts.
Choosing the right framework - Spring Boot Tutorial
From the course: Creating Spring Boot Microservices
Choosing the right framework
- [Instructor] Spring Web MVC is a well-known web tier development framework. But did you know that it can be used to create Restful APIs? This has been possible since its inception, but the implementation resulted in controller classes that were messy and brutal with annotations. That changed with Spring Web MVC version four with introduction of the @RestController annotation. Annotating a class with @RestController tells Spring MVC that this class follows Restful web service stereotypical behavior. A RestController class mediates between web requests and the internals of the application. It is responsible for directing requests to the appropriate services and then sending the response back to the client. In Spring Data REST, the framework itself mediates between web requests and the persistent domain model. So what are the reasons you would choose to use and expose an API via the RestController? One reason is that your application is not using Spring Data REST repositories. Another…
Contents
-
-
-
-
-
-
-
(Locked)
Choosing the right framework3m 31s
-
Declaring a new RestController6m 29s
-
(Locked)
Create the RestController HTTP POST endpoint7m 31s
-
(Locked)
Create the RestController HTTP GET endpoint3m 23s
-
(Locked)
Create the RestController HTTP PUT, PATCH, and DELETE endpoints3m 34s
-
(Locked)
Challenge: Add a PATCH endpoint1m 6s
-
(Locked)
Solution: Add a PATCH endpoint1m 20s
-
(Locked)
-
-
-
-
-