001package io.jstach.opt.spring;
002
003import io.jstach.jstache.JStache;
004import io.jstach.jstache.JStacheConfig;
005import io.jstach.jstache.JStachePath;
006
007/**
008 * Static config for Spring Boot like conventions of finding templates in
009 * <code>classpath:/templates</code>.
010 * <p>
011 * Place the below on a <code>package-info.java</code> where your JStache models are or if
012 * in a modular environment <code>module-info.java</code>
013 * <pre><code class="language-java">
014 * &#64;JStacheConfig(using = SpringJStacheConfig.class)
015 * &#47;&#47; some class, package-info, module-info
016 * </code> </pre>
017 *
018 * Assuming you have a JStache model with {@linkplain JStache#path() path of}
019 * "<code>MyView</code>" the resolved template location would be
020 * <code>src/main/resources/templates/MyView.mustache</code>.
021 *
022 * @author agentgt
023 * @apiNote This annotation does not have a dependency on Spring Boot and maybe used
024 * without it
025 */
026@JStacheConfig(pathing = @JStachePath(prefix = "templates/", suffix = ".mustache"))
027public enum SpringJStacheConfig {
028
029}