Skip to content

ppalaga/quarkiverse-freemarker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quarkus Freemarker

Freemarker is a very popular and mature templating engine. Its integration as a Quarkus extension provides developers ease of configuration, and offers support for native images.

To get started, add the dependency:

<dependency>
    <groupId>io.quarkiverse</groupId>
    <artifactId>quarkus-freemarker</artifactId>
</dependency>

Add some ftl templates in src/main/resources/freemarker/templates:

Hello ${name}!

Inject the template in your code:

@Inject
@TemplatePath("hello.ftl")
Template hello;

Build a model and start rendering your template:

StringWriter stringWriter = new StringWriter();
hello.process(Map.of("name", "bob"), stringWriter);
String result = stringWriter.toString();

For more details, check the complete documentation.

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Vincent Sevel

💻 🚧

About

Quarkus Freemarker Extension

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 99.5%
  • FreeMarker 0.5%