What I do is use the Thymeleaf attributes but I don't want to have for example an extra div.
For example, I have this
<div sec:authorize="hasRole('ROLE_ADMIN')">
This content is only shown to administrators.
</div>
But I'd like something like this:
<sec:authorize="hasRole('ROLE_ADMIN')">
This content is only shown to administrators.
</>
Is this possible?