Class JStachioHttpMessageConverter

java.lang.Object
org.springframework.http.converter.AbstractHttpMessageConverter<Object>
io.jstach.opt.spring.web.JStachioHttpMessageConverter
All Implemented Interfaces:
HttpMessageConverter<Object>

Typesafe way to use JStachio in Spring Web.

For this to work the controllers need to return JStache models and have the controller method return annotated with ResponseBody.

Example:


 @JStache
 public record HelloModel(String message){}

 @GetMapping(value = "/")
 @ResponseBody
 public HelloModel hello() {
     return new HelloModel("Spring Boot is now JStachioed!");
 }
  
Author:
agentgt