如何在春季安全标签中提及没有hasRole('ROLE_ADMIN')

我如何使用弹簧安全标签库编写以下条件?

<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>

<sec:authorize access="not of hasRole('ROLE_ADMIN')">
   <div> show these for only non admins </div>
</sec:authorize>

答案 1
<sec:authorize access="!hasRole('ROLE_ADMIN')">
   <div> show these for only non admins </div>
</sec:authorize>

答案 2

推荐