From the course: Creating Your First Spring Boot Microservice

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Choosing the right framework

Choosing the right framework

From the course: Creating Your First Spring Boot Microservice

Start my 1-month free trial

Choosing the right framework

- [Woman] 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 implementation resulted in controller classes that were messy and riddled with annotations. That change was Spring Web MVC version 4, with the introduction of the @RestController annotation. Annotating a class with @RestController tells Spring Web MVC this class follows Restful Web Service stereotypical behavior. A REST Controller 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 expose an API via the REST controller? One reason is that your application is…

Contents