Uses of Record Class
io.jstach.opt.spring.example.hello.HelloModel
-
Uses of HelloModel in io.jstach.opt.spring.example.hello
Modifier and TypeFieldDescriptionfinal Template<HelloModel>
HelloController.view
(Optional) Spring will inject this template as the templates are either component scanned or loaded by the ServiceLoader into Spring's context.Modifier and TypeMethodDescriptionHelloController.hello()
Here we use JStachio runtime to resolve the renderer (in this case we are calling them Views) via Springs Http Message Converter.Modifier and TypeMethodDescriptionHelloController.entity()
Here we use aResponseEntity
which allows use to set status codes with our model to be rendered.Modifier and TypeMethodDescriptionprotected static <A extends Output.EncodedOutput<E>,
E extends Exception>
voidHelloModelView.encode
(HelloModel data, A unescapedWriter, Formatter formatter, Escaper escaper, Appender appender) Renders to an OutputStream use pre-encoded parts of the template.HelloModelView.execute
(HelloModel model, A a) HelloModelView.execute
(HelloModel model, A a, Formatter formatter, Escaper escaper) Renders the passed in model.HelloModelView.execute
(HelloModel model, StringBuilder sb) HelloModelView.render
(HelloModel data, A unescapedWriter, Formatter formatter, Appender escaper, Appender appender) Renders the passed in model.<A extends Output.EncodedOutput<E>,
E extends Exception>
AHelloModelView.write
(HelloModel model, A outputStream) ModifierConstructorDescriptionHelloController
(JStachio jstachio, Template<HelloModel> view) Placate JDK 18 Javadoc