0
嗨,我正在开发springboot项目,并将thymeleaf.extras.springsecurity4添加到了我的项目中。实际上,它已经工作了很长一段时间,但知道这是不是working.not工作部分是秒:授权=“hasRole(‘正常’)”的thymeleaf.extras.springsecurity4秒:授权不起作用
<p>Kontrol Paneli</p>
<span sec:authentication="name">Bob</span>
Roles: <span sec:authentication="principal.authorities">[ROLE_USER, ROLE_ADMIN]</span> |
<p sec:authorize="!hasRole('NORMAL')">I am here</p>
<p sec:authorize="!hasRole('ADMIN')">I am here</p>
</a></li>
显示为你看到秒代码:授权不关心用户具有哪个角色。