All Projects → allegro → Handlebars Spring Boot Starter

allegro / Handlebars Spring Boot Starter

Licence: apache-2.0
Spring Boot auto-configuration for Handlebars

Programming Languages

groovy
2714 projects

Projects that are alternatives of or similar to Handlebars Spring Boot Starter

Velocity Spring Boot Project
A Spring Boot Starter for velocity including Spring's official and Alibaba's implementation , e.g, Layout , Tools supports.
Stars: ✭ 285 (+179.41%)
Mutual labels:  spring-boot, spring-boot-starter
Versioning Spring Boot Starter
Spring boot starter using for versioning rest easily.
Stars: ✭ 11 (-89.22%)
Mutual labels:  spring-boot, spring-boot-starter
Druid Spring Boot
Spring Boot Starter for Druid.
Stars: ✭ 305 (+199.02%)
Mutual labels:  spring-boot, spring-boot-starter
Cas Client Autoconfig Support
Annotation-based configuration support for Apereo CAS Java clients
Stars: ✭ 153 (+50%)
Mutual labels:  spring-boot, spring-boot-starter
Disconf Spring Boot Starter
disconf-spring-boot-starter 让你可以使用spring-boot的方式开发依赖disconf的程序 只需要关心disconfi的配置文件和配置项,省略了编写xml的麻烦
Stars: ✭ 44 (-56.86%)
Mutual labels:  spring-boot, spring-boot-starter
Tutorial Soap Spring Boot Cxf
Tutorial how to create, test, deploy, monitor SOAP-Webservices using Spring Boot and Apache CXF
Stars: ✭ 167 (+63.73%)
Mutual labels:  spring-boot, spring-boot-starter
Logbook
An extensible Java library for HTTP request and response logging
Stars: ✭ 822 (+705.88%)
Mutual labels:  spring-boot, spring-boot-starter
Jasypt Spring Boot
Jasypt integration for Spring boot
Stars: ✭ 1,948 (+1809.8%)
Mutual labels:  spring-boot, spring-boot-starter
Ssh Shell Spring Boot
Spring shell in spring boot application over ssh
Stars: ✭ 43 (-57.84%)
Mutual labels:  spring-boot, spring-boot-starter
Spring Thrift Api Gateway
Gateway for Apache Thrift requests processing that is built on Spring Cloud stack
Stars: ✭ 38 (-62.75%)
Mutual labels:  spring-boot, spring-boot-starter
Grpc Spring Boot Starter
Spring Boot starter module for gRPC framework.
Stars: ✭ 2,190 (+2047.06%)
Mutual labels:  spring-boot, spring-boot-starter
Telegram Spring Boot Starter
Telegram Bot API Spring Boot Starter
Stars: ✭ 79 (-22.55%)
Mutual labels:  spring-boot, spring-boot-starter
Grpc Spring Boot Starter
Spring Boot starter module for gRPC framework.
Stars: ✭ 1,829 (+1693.14%)
Mutual labels:  spring-boot, spring-boot-starter
Rocketmq Spring Boot Starter
rocketmq-spring-boot-starter
Stars: ✭ 178 (+74.51%)
Mutual labels:  spring-boot, spring-boot-starter
Spring Backend Boilerplate
The modularized backend boilerplate based on Spring Boot Framework, easy to get started and add your business part.
Stars: ✭ 134 (+31.37%)
Mutual labels:  spring-boot, spring-boot-starter
Azure Spring Boot
Spring Boot Starters for Azure services
Stars: ✭ 352 (+245.1%)
Mutual labels:  spring-boot, spring-boot-starter
Logback Access Spring Boot Starter
Spring Boot Starter for Logback-access
Stars: ✭ 118 (+15.69%)
Mutual labels:  spring-boot, spring-boot-starter
Bucket4j Spring Boot Starter
Spring Boot Starter for Bucket4j
Stars: ✭ 127 (+24.51%)
Mutual labels:  spring-boot, spring-boot-starter
Netty Websocket Spring Boot Starter
🚀 lightweight high-performance WebSocket framework ( 轻量级、高性能的WebSocket框架)
Stars: ✭ 885 (+767.65%)
Mutual labels:  spring-boot, spring-boot-starter
Spring Higher Order Components
⚡️ Preconfigured components to speedup Spring Boot development
Stars: ✭ 65 (-36.27%)
Mutual labels:  spring-boot, spring-boot-starter

Spring Boot Starter Handlebars

Build Status Coverage Status Maven Central

Spring Boot Starter support for Handlebars.java (logic-less templates).

Usage

Add handlebars-spring-boot-starter as dependency:

repositories {
    mavenCentral()
}

dependencies {
    compile 'pl.allegro.tech.boot:handlebars-spring-boot-starter:0.3.2'
}

Requirements

Since version 0.3.0 handlebars-spring-boot-starter requires Spring Boot 2.0, Spring Framework 5 and Java 8.

Helpers

Spring Boot Starter Handlebars will automatically register handlebars helpers based on project dependencies. Add any handlebars helper to dependencies and you can start using it.

dependencies {
    compile 'com.github.jknack:handlebars-helpers:4.2.0',
            'com.github.jknack:handlebars-jackson2:4.2.0',
            'com.github.jknack:handlebars-humanize:4.2.0',
            'com.github.jknack:handlebars-markdown:4.2.0'
}

NOTE: Jackson2Helper and MarkdownHelper will register with name json and md respectively. Every other helper will register with its default name.

More information about available helpers can be found on Handlebars.java.

Custom helpers

To register a custom helper use @HandlebarsHelper annotation.

Example

@HandlebarsHelper
public class CustomHelper {
    CharSequence foo() {
        return 'bar'
    }
}

More information about how to create custom helpers can be found on Using a HelperSource

Configuration

Properties space is: handlebars. All basic properties of AbstractTemplateViewResolverProperties.java are available.

Default configuration:

handlebars.enabled: true
handlebars.prefix: classpath:templates/
handlebars.suffix: .hbs
handlebars.cache: true
handlebars.registerMessageHelper: true
handlebars.failOnMissingFile: false
handlebars.bindI18nToMessageSource: false
handlebars.prettyPrint: false
handlebars.infiniteLoops: false

NOTE: handlebars-guava-cache is used as template cache implementation.

resolver configuration allows on/off available handlebars value resolvers. Here goes default configuration:

handlebars.resolver.javaBean: true
handlebars.resolver.map: true
handlebars.resolver.method: false
handlebars.resolver.field: false

More information about value resolvers can be found on Using the ValueResolver.

Custom cache template

Set handlebars template cache by @Bean of type TemplateCache.

Custom template loader

Set handlebars template loader by @Bean of type TemplateLoader.

License

handlebars-spring-boot-starter is published under Apache License 2.0.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].