January 2018
Intermediate to advanced
414 pages
10h 29m
English
When we create handlers, we may encounter errors, and those errors can be handled with one special method in any reactive publisher onErrorResume. Let's modify our create method in the CustomerHandler class to understand how it works:
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.*import org.springframework.web.reactive.function.server.bodyToMonoimport reactor.core.publisher.onErrorResumeimport java.net.URI@Componentclass CustomerHandler( ...
Read now
Unlock full access