January 2018
Intermediate to advanced
414 pages
10h 29m
English
We will change our /customers route to search for customers, in the same way, that our RESTful APIs examples did.
First, we need to create a new handler in our CustomerHandler class for this search:
package com.microservices.chapter4import org.springframework.http.HttpStatusimport org.springframework.stereotype.Componentimport org.springframework.web.reactive.function.BodyInserters.fromObjectimport org.springframework.web.reactive.function.server.ServerRequestimport org.springframework.web.reactive.function.server.ServerResponse.okimport org.springframework.web.reactive.function.server.ServerResponse.status@Componentclass CustomerHandler(val customerService: CustomerService) { fun get(serverRequest: ServerRequest) = ...
Read now
Unlock full access