Spring Boot Security Role-based Authorization Tutorial

Published: 19 April 2020
on channel: Code Java
94,254
1.1k

Learn to use Spring Security to authorize users based on their roles (authorities) for a Spring Boot application. The credentials and authority are stored in MySQL database. Spring Data JPA with Hibernate is used for the data access layer. Thymeleaf is used for the view templates.

Here's what you will learn:
- Create tables in MySQL to store credentials and roles.
- Declare dependencies for Spring Security, Spring Data JPA, MySQL JDBC driver and Thymeleaf integration with Spring Secrity.
- Configure data source
- Code User & Role model classes.
- Code UserRepository interface.
- Implement UserDetails & UserDetailsService interfaces.
- Configure authentication & authorization

Text-based tutorial: https://www.codejava.net/frameworks/s...

Recommended course: https://www.udemy.com/course/spring-b... - Learn to Build a complete shopping website using Java, Spring Boot, Thymeleaf, Bootstrap, jQuery and MySQL database.