- All Implemented Interfaces:
Serializable
,Comparable<SpringJStacheConfig>
,Constable
@JStacheConfig(pathing=@JStachePath(prefix="templates/",suffix=".mustache"))
public enum SpringJStacheConfig
extends Enum<SpringJStacheConfig>
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
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Method Summary
Modifier and TypeMethodDescriptionstatic SpringJStacheConfig
Returns the enum constant of this class with the specified name.static SpringJStacheConfig[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-