Changing the CategoryResource

We will change the CategoryResource class. The idea is pretty simple. We will convert our ResponseEntity, which is parametrized with the models class to ResponseEntity using Mono or Flux.

The new version of the CategoryResource should be like this:

package springfive.cms.domain.resources;import org.springframework.http.HttpStatus;import org.springframework.http.ResponseEntity;import org.springframework.web.bind.annotation.DeleteMapping;import org.springframework.web.bind.annotation.GetMapping;import org.springframework.web.bind.annotation.PathVariable;import org.springframework.web.bind.annotation.PostMapping;import org.springframework.web.bind.annotation.PutMapping;import org.springframework.web.bind.annotation.RequestBody; ...

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.