February 2018
Intermediate to advanced
356 pages
9h 10m
English
Let's start with our simplest service, the CategoryService class, the behaviors expected of this class are CRUD operations. Then, we need a representation of our persistence storage or repository implementation, for now, we are using the ephemeral storage and ArrayList with our categories. In the next chapter, we will add the real persistence for our CMS application.
Let's create our first Spring service. The implementation is in the following snippet:
package springfive.cms.domain.service;import java.util.List;import org.springframework.stereotype.Service;import springfive.cms.domain.models.Category;import springfive.cms.domain.repository.CategoryRepository;@Servicepublic class CategoryService { private final CategoryRepository ...