Trong thymleaf e có đoạn phân role như này: nhưng nó ko nhận thì lỗi là do ở bên Java e code chưa có quyền hay sao ạ.
Nếu đúng thì f12 sẽ ko có đoạn sec:authorize= như ảnh nữa ạ
<img src="https://stackask.com/wp-content/uploads/2023/02/aa.png" alt="" class="alignnone size-full wp-image-9535" />
Cho e hỏi lỗi này là do e config bên thymleaf chưa đủ hay do bên BE e chưa set đúng role hay sao ạ.
E có khai báo
xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity"
và dependency
thymeleaf-extras-springsecurity4