title: Spring WebFlux throws 'producer' type is unknow when I return value in the response body
body: <p>I'm using Spring Boot with Kotlin, and now trying to get status value from a GET restful service by passing a handler for a reactive service.</p>
  
  <p>I can see that the handler I'm passing is in the request, but whenever I'm building the body, I get this exception:</p>
  
  <pre><code>java.lang.IllegalArgumentException: 'producer' type is unknown to ReactiveAdapterRegistry
      at org.springframework.util.Assert.notNull(Assert.java:198) ~[spring-core-5.2.0.RELEASE.jar:5.2.0.RELEASE]
      Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException
  </code></pre>
  
  <p><strong>Here is my code</strong>:</p>
  
  <pre><code>@Bean
      fun getReceiptConversionStatus() = router {
          accept(MediaType.APPLICATION_JSON).nest {
              GET("/BsGetStatus/{handler}", ::handleGetStatusRequest)
          }
      }
      private fun handleGetStatusRequest(serverRequest: ServerRequest): Mono&lt;ServerResponse&gt; = ServerResponse
              .ok()
              .contentType(MediaType.APPLICATION_JSON)
              .body(GetStatusViewmodel(fromObject(serverRequest.pathVariable("handler"))), GetStatusViewmodel::class.java)
              .switchIfEmpty(ServerResponse.notFound().build())
  </code></pre>
  
  <p>and that's my Viewmodel:</p>
  
  <pre><code>data class GetStatusViewmodel(
          @JsonProperty("handler") val documentHandler: String
  )
  </code></pre>