-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Hands-On Microservices with Kotlin
By :

Now that we have a Repository, we can use it in our microservice to perform the operations that our microservice will expose. So, let's try to modify our previously created reactive RESTful operations into CRUD operations in our database and answer back to whoever invoked it reactively.
We learned how to create reactive RESTful Microservices in Chapter 4, Creating Reactive Microservices. We'll use some of the code that was created during that chapter; if you are not familiar with it, you may want to review the content of that chapter.
Previously, we have created a service class to hide the implementation details how we persist in our Model, so let's do it again by creating a CustomerService
interface, for now, just a method to get a Customer
from an id
:
package com.microservices.chapter5 import reactor.core.publisher.Mono interface CustomerService { fun getCustomer(id: Int): Mono<Customer> }
Now, we will create the implementation of the...