У меня есть этот шаблон:
Код: Выделить всё
...
Код: Выделить всё
src/main/resources/assets/css/style.css
src/main/resources/templates/thymeleaf/books.html
Код: Выделить всё
fun Application.configureTemplating() {
install(Thymeleaf) {
setTemplateResolver(ClassLoaderTemplateResolver().apply {
prefix = "templates/thymeleaf/"
suffix = ".html"
characterEncoding = "utf-8"
})
}
}
Код: Выделить всё
org.thymeleaf.exceptions.TemplateProcessingException: Link base "/assets/css/style.css" cannot be context relative (/...) unless the context used for executing the engine implements the org.thymeleaf.context.IWebContext interface (template: "books" - line 5, col 26)
Подробнее здесь: https://stackoverflow.com/questions/791 ... t-relative
Мобильная версия