Take the knowledge from the previous section and actually expose the services through REST.
- [Frank] Now we're going to actually…go through the process of exposing our business service…through a REST interface.…Before we actually jump into building…that RESTful web service…I want to show you a couple…refactoring changes that we made.…If you take a look at the actual controller…you'll notice that I'm no longer doing the date format.…As a matter of fact I'm just passing the string…into the business service.…I kind of alluded to this during the testing…that the date really was not in the most appropriate place.…
Indeed I basically have taken all of that exact same code…and moved it into my ReservationService.…At this point before we get into this…I would invite you to go grab those exercise files…and update your local system…to match my refactoring changes.…For what it's worth I went ahead…and made the same changes in the tests…to show you that those tests…are very valuable during refactoring.…As we have done before, let's create a new package.…
This time we are going to under our group name…call it landon.web.service.…
- Creating a project with Spring Initializr
- Examining the Spring Boot skeleton project with Spring Data JPA
- Creating an embedded database for Spring Boot development and testing
- Building a service abstraction
- Using the IoC paradigm in Spring to develop a service layer
- Building a controller
- Testing a controller MockMvc
- Exposing a service layer through REST
Skill Level Intermediate
Q: This course was updated on 09/06/2018. What changed?
A: The following topics were updated: creating a project with Spring Initializr, examining the Spring Boot skeleton project, developing a service object with Spring, and testing a controller MockMvc.