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

Add Thymeleaf templating feature #988

Merged
merged 2 commits into from
Apr 24, 2019
Merged

Conversation

t-kameyama
Copy link
Contributor

Fixes #709

@e5l e5l requested a review from cy6erGn0m March 1, 2019 07:27
/**
* Thymeleaf support feature. Provides ability to respond with [Thymeleaf]
*/
class Thymeleaf(private val engine: TemplateEngine) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't it require/provide any configuration? For example, resolution rules?

Copy link
Contributor Author

@t-kameyama t-kameyama Mar 3, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We set configurations like this:

application.install(Thymeleaf) {
    val resolver = ClassLoaderTemplateResolver()
    resolver.setTemplateMode("HTML")
    resolver.prefix = "templates/"
    resolver.suffix = ".html"
    setTemplateResolver(resolver)
}

@cy6erGn0m cy6erGn0m merged commit 118f4fd into ktorio:master Apr 24, 2019
@cy6erGn0m
Copy link
Contributor

Thanks!

@t-kameyama t-kameyama deleted the issue_709 branch April 24, 2019 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Feature - Thymeleaf template engine
2 participants