I have an enum, Constants:
Constants
enum Constants { ONE,TWO,THREE; }
How can I compare the enum Constants in Thymeleaf.
Thank
One more way:
th:if="${constant.name() == 'ONE'}"
It's shorter but makes compare with string representation, can cause problem while refactoring.