<html lang="en" xmlns:th="http://www.thymeleaf.org" th:fragment="layout(content)"
xmlns:sec="https://www.thymeleaf.org/thymeleaf-extras-springsecurity5">
1. it used when, loggin successfully
<div sec:authorize="isAuthenticated()">
</div>
2. after login, shown for particular user access...
<span sec:authorize="hasAnyAuthority('ROLE_USER')"><b>USER</b> </span>
3. when autorised user not login then showing
<div sec:authorize="isAnonymous()">
</div>
Comments
Post a Comment