spring-fu
spring-fu copied to clipboard
FreeMarker auto config not working
Following does not work. Give error: java.lang.IllegalArgumentException: Could not resolve view with name 'hello'
val app = reactiveWebApplication {
webFlux {
codecs {
string()
jackson()
}
coRouter {
(GET("/hello") and accept(MediaType.TEXT_HTML)) {
ok().renderAndAwait("hello")
}
}
}
}
fun main(args: Array<String>) {
app.run(args)
}
I set up a debug point at FreeMarkerAutoConfiguration
but its not loading.
But This works:
@SpringBootApplication
class PasteApplication
fun main(args: Array<String>) {
runApplication<PasteApplication>(*args)
}
@Controller
class Foo {
@GetMapping("/hello")
fun bar(): String {
return "hello"
}
}
May be I am missing some configuration. Please help.
Seems like we need to create initializer for FreeMarker like already done for Mustache.
Reopening issue to add such support.