<@U0BUH9FRD> <@U0DJ8K3CH> thx! I’m trying to build...
# spring
v
@sdeleuze @dariuszbacinski thx! I’m trying to build a sample app with kotlin and spring boot 2. project structure like in mixIt. I have a service with foo method which get byte array data from another web service
Copy code
fun foo(): Flux<ByteArray> {
        val client = WebClient.create("<https://byte-array-service>")
        return client
                .get()
                .uri("/info")
                .accept(MediaType.APPLICATION_OCTET_STREAM)
                .exchange()
                .flatMapMany {
                    r -> r.bodyToFlux(ByteArray::class.java)
                }
    }
In my handler I do this
Copy code
fun handleFoo(req: ServerRequest) = myService
            .foo()
            .flatMap {
                ok().body(BodyInserters.fromObject(it))
            }
Compile is ok byt maybe I was wrong with BodyInserter. But my router does not compile
Copy code
"/foo".nest {
                GET("/", myHandler::handleFoo)
            }