Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

369
Views
How to use the Kotlinx.html in Spring in place of the normal html template engine for JSP or Thymeleaf?

The flaw of the traditional html template engine is the absence of type-safe and compile-time checking. Some gurus suggested that Kotlinx.html might greatly compensate the flaw of traditional html template engine.

So I plan to make use of Spring in Java without the html template engine, say without SpringResourceTemplateResolver nor SpringTemplateEngine, instead inject the kotlin code with kotlinx.html. But currently I've go clue at all how to proceed

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Right now I'm just returning a string with the kotlin html dsl as the return statement and the @ResponseBody annotation on the controller method.

@Controller
@RequestMapping("/")
class MyController constructor(){

  @GetMapping
  @ResponseBody
  fun index(): String {

    return myKotlinHtmlView()
  }
}

where myKotlinHtmlView() is the function where the template is

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!