February 2018
Intermediate to advanced
356 pages
9h 10m
English
This is an interesting service which will be responsible for managing the state of our news. It will interact like a glue to call the domain models, in this case, the News entity. The service is pretty similar to the others. We received the NewsRepository class, a dependency and kept the repository to maintain the states, let's do that.
The @Service annotation is present again. This is pretty much standard for Spring applications. Also, we can change to the @Component annotation, but it does not make any difference to our application.