Creating the Plane service

Our PlaneService will be responsible for creating a kind of glue between the PlaneRepository and PlaneResource; the latter one we will create in the next section. The implementation should be like this:

package springfive.airline.airlineplanes.service;import lombok.NonNull;import org.springframework.stereotype.Service;import reactor.core.publisher.Flux;import reactor.core.publisher.Mono;import springfive.airline.airlineplanes.domain.Plane;import springfive.airline.airlineplanes.repository.PlaneRepository;import springfive.airline.airlineplanes.resource.data.PlaneRequest;@Servicepublic class PlaneService {  private final PlaneRepository planeRepository;  public PlaneService(PlaneRepository planeRepository) {    this

Get Spring 5.0 By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.