Nowadays, Spring Boot gets more and more popular as it simplifies creating standalone, production-grade Spring based applications. It offers e.g. auto-configuration support for most of the available Java-based template engines such as Velocity, Thymeleaf, etc. Today, we would like to publish the new Spring Boot starter that supports auto-configuration of other popular template engine we have recently got used to — Handlebars. Hopefully you might find this little piece of code useful.

Follow Spring Boot for further information about its auto-configuration and other helpful features.


As you can expect for any Spring Boot starter its use is pretty straightforward. Just add handlebars-spring-boot-starter to dependencies of your Spring Boot application and your Handlebars templates will be picked up automatically from src/main/resources/templates.

repositories {

dependencies {
    compile ''

Naturally, you can customize configuration settings. Check to find custom configuration examples.

Example Spring Boot application




public static class Application {

    public String index(Model model) {
        model.addAttribute("foo", "Hello Handlebars!");
        return "index";

    public static void main(String[] args) {, args);

Now start the application and go to http://localhost:8080.

Where can I find it?

handlebars-spring-boot-starter is published under Apache License 2.0 at Allegro Github account along with the other Allegro OpenSource projects and released to Maven Central. To find out more about it, check located in handlebars-spring-boot-starter repository.