Class HandlebarsUtils
java.lang.Object
io.micrometer.docs.commons.templates.HandlebarsUtils
Utility for
Handlebars
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic com.github.jknack.handlebars.Handlebars
static com.github.jknack.handlebars.Template
createTemplate
(String templateLocation) Create a handlebarTemplate
from template location.
-
Constructor Details
-
HandlebarsUtils
public HandlebarsUtils()
-
-
Method Details
-
createHandlebars
public static com.github.jknack.handlebars.Handlebars createHandlebars() -
createTemplate
public static com.github.jknack.handlebars.Template createTemplate(String templateLocation) throws IOException Create a handlebarTemplate
from template location.While loading the template, this method converts the line delimiter from the one used in template file("LF") to the one from the running OS. (for example, "CRLF" on a windows machine).
- Parameters:
templateLocation
- template location (either in classpath or file system)- Returns:
- a template
- Throws:
IOException
- If the template's source can't be resolved.
-