Была ли решена эта проблема?

ользую Spring HATEOAS, следуя инструкциям:

https://spring.io/guides/gs/rest-hateoas/#initial

package hello;

import static org.springframework.hateoas.mvc.ControllerLinkBuilder.*;

import org.springframework.http.HttpEntity;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@RestController
public class GreetingController {

    private static final String TEMPLATE = "Hello, %s!";

    @RequestMapping("/greeting")
    public HttpEntity<Greeting> greeting(@RequestParam(value = "name", required = false, defaultValue = "World") String name) {

        Greeting greeting = new Greeting(String.format(TEMPLATE, name));
        greeting.add(linkTo(methodOn(GreetingController.class).greeting(name)).withSelfRel());

        return new ResponseEntity<Greeting>(greeting, HttpStatus.OK);
    }
}

Теперь я хочу использовать репозиторий и вывести ответ Flux / Mono:

@RestController
class PersonController {

    private final PersonRepository people;

    public PersonController(PersonRepository people) {
        this.people = people;
    }

    @GetMapping("/people")
    Flux<String> namesByLastname(@RequestParam Mono<String> lastname) {

        Flux<Person> result = repository.findByLastname(lastname);
        return result.map(it -> it.getFullName());
    }
}

Как я могу использовать Spring HATEOAS для ответа Flux / Mono? Это вообще возможно?

Ответы на вопрос(1)

Ваш ответ на вопрос