Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FreeMarker auto config not working #291

Open
dragneelfps opened this issue Jul 20, 2020 · 2 comments
Open

FreeMarker auto config not working #291

dragneelfps opened this issue Jul 20, 2020 · 2 comments
Labels
type: enhancement A general enhancement

Comments

@dragneelfps
Copy link

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.

@dragneelfps
Copy link
Author

Seems like we need to create initializer for FreeMarker like already done for Mustache.

@sdeleuze
Copy link
Collaborator

Reopening issue to add such support.

@sdeleuze sdeleuze reopened this Sep 24, 2020
@sdeleuze sdeleuze added the type: enhancement A general enhancement label Jan 8, 2021
@sdeleuze sdeleuze added this to the General backlog milestone Jan 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants