Ive got a question about a couple of patterns I've...
# spring
s
Ive got a question about a couple of patterns I've seen with the new Kotlin functional DSL. I've got a working app that exposes routes like this:
Copy code
beans {
   bean { Routes(ref()).router() }
   ... snip ...
}
But I've seen this used as well:
Copy code
bean<WebHandler>("webHandler") {
    RouterFunctions.toWebHandler(
      ref<Routes>().router(),
      HandlerStrategies.builder().viewResolver(ref()).build()
    )
  }
I am confused when I would use
toWebHandler
.