Issue
I try to replace
<div sec:authorize="hasRole('ADMIN')"></div>
by
<div sec:authorize="hasRole(${T(com.mypackage.Role).ADMIN.getText()})"></div>
but it does not work. Then I tried
<div th:with="role=${T(com.mypackage.Role).ADMIN.getText()}" sec:authorize="hasRole(${role})"></div>
and with preprocessing
<div th:with="role=${T(com.mypackage.Role).ADMIN.getText()}" sec:authorize="hasRole(__${role}__)"></div>
but is still not working.
Solution
<div sec:authorize="hasRole(T(com.mypackage.Role).ADMIN)"></div>
Thanks @ChetanAhirrao
Answered By - Kevin O.
Answer Checked By - Dawn Plyler (JavaFixing Volunteer)