Module io.jstach.opt.dropwizard
module io.jstach.opt.dropwizard
JStachio Dropwizard integration:
io.jstach:jstachio-dropwizard.
Step 1: add ViewBundle
bootstrap.addBundle(new ViewBundle<>());
Step 2: annotate package-info or module-info
@JStacheConfig(using = DropwizardJStacheConfig.class)
// some class, package-info, module-info
Step 3: have JStache models implement JStacheViewSupport
@JStache
public record ExampleModel(String message) implements JStacheViewSupport {}
Step 4: return dropwizard views by using toView()
@GET
public View hello() {
return new ExampleModel("Hello world dropwizard using mixin").toView();
}
- Author:
- agentgt
- See Also:
-
Packages
-
Modules
ModifierModuleDescriptiontransitiveJStachio compile time annotations: io.jstach:jstachio-annotation.