spring-hateoas-examples
spring-hateoas-examples copied to clipboard
Create WebFlux + Boot example
That would be very interessting.
Especially it looks like that
X-Forwarded-Prefix:
is no more added to Link in such a scenario
spring:
main:
web-application-type: reactive
server:
forward-headers-strategy: native
Perhaps this could be some example:
private fun wrapInHateoas(someObject: SomeObject): Mono<EntityModel<SomeObject>> =
someObject
.toMono()
.zipWith(linkTo(controller.getSomeObject(someObject.id)).withSelfRel().toMono()) {
some: SomeObject, link: Link -> EntityModel(some, link)
}