Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

374
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda