Enum Class SpringJStacheConfig

java.lang.Object
java.lang.Enum<SpringJStacheConfig>
io.jstach.opt.spring.SpringJStacheConfig
All Implemented Interfaces:
Serializable, Comparable<SpringJStacheConfig>, Constable

Static config for Spring Boot like conventions of finding templates in classpath:/templates.

Place the below on a package-info.java where your JStache models are or if in a modular environment module-info.java


 @JStacheConfig(using = SpringJStacheConfig.class)
 // some class, package-info, module-info
  
Assuming you have a JStache model with path of "MyView" the resolved template location would be src/main/resources/templates/MyView.mustache.
Author:
agentgt
API Note
This annotation does not have a dependency on Spring Boot and maybe used without it
  • Method Details

    • values

      public static SpringJStacheConfig[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static SpringJStacheConfig valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null