enum
package com.example;
public enum Months {
JANUARY, FEBRUARY, MARCH, APRIL, MAY, JUNE, JULY, AUGUST, SEPTEMBER, OCTOBER, NOVEMBER, DECEMBER;
}
thymeleaf
<div th:if="${month == T(com.example.Months).JANUARY}">
Displayed when month is JANUARY
</div>
Recommended Posts