Posts by piedroalex • 41 points
4 posts
-
1
votes2
answers771
viewsA: How to hide menu items using spring security?
Friend, add to your menu item a th:if="${#authorization.expression('hasRole(''ROLE_ADMIN'')')}", so this item will only be shown if the user has this permission.
-
0
votes1
answer88
viewsA: Error while Logging in using Spring Security
Friend, you have to ignore the folder where the scripts are. js, I believe this solves your problem: @Override public void configure(WebSecurity web) throws Exception {…
-
0
votes1
answer323
viewsA: 2 form on the same page with Spring mvc, Thymeleaf, anyone know how?
Friend, I believe the error referred to is that you have not put in @Modelattribute the name of the object to which you refer and which is in the view. Test this: @GetMapping("/cadastro") public…
-
0
votes1
answer244
viewsA: Persistence with Spring and Thymeleaf in multiple tables in the same form
You can reference the object and attribute directly in the form element instead of setting only one th:Object for the entire form, for example: <form class="form-horizontal" th:method="POST"…