In this Spring Security video, you will learn how to implement user role assignment functionality in a Spring Boot web application. In details, I'll show you:
- Code Role Entity Class & Role Repository interface
- Code Adding Roles to User in Unit Tests
- Code Adding Default Role to User in Registration (assign default role to user)
- Code Updating Roles of User in Web Form (assign roles to user)
Technologies:
- Spring Boot Web
- Spring Data JPA with Hibernate
- Spring Security
- Thymeleaf
- MySQL Database
Software programs:
- Java Development Kit (OpenJDK)
- Spring Tool Suite (STS)
- MySQL Server & MySQL Workbench
For code snippets and sample Spring Boot project, refer to the written article at: https://www.codejava.net/frameworks/spring-boot/spring-security-add-roles-to-user-examples