Eureka client
Similar to the Eureka server, each OTRS service should also contain the Eureka client configuration, so that a connection between the Eureka server and the client can be established. Without this, the registration and discovery of services is not possible.
Your services can use the following Spring configuration to configure the Eureka client. Add the following configuration in the Restaurant, Booking, and User services (restaurant-service\src\main\resources\application.yml
):
eureka: client: serviceUrl: defaultZone: http://localhost:8761/eureka/
Booking and user services
We can use the RestaurantService
implementation to develop the Booking and User services. The User service can offer the endpoint related to the User resource with respect to CRUD operations. The Booking service can offer the endpoints related to the booking resource with respect to CRUD operations and the availability of table slots. You can find the sample code of these services on the Packt website...