A spring boot application that shows how to implement role based access control. It has also dynamic menu permission based access control functionalities.
- Java 17
- Spring Boot v3.3.0-SNAPSHOT
- Spring Web
- Spring Data JPA
- Spring Security
- Postgres database
- Jwt based authorization
- Maven
The application has implemented role based access control with dynamic and configurable menu permissions.
How to start:
- Clone the repository to your local machine.
- Update the project as maven project.
- Create a database in postgres with name:
spring_jwt_security
- Update database credentials in the
application.properties
file. - Update default users (
ADMIN
andUSER
) properties. - Run the project.
-
Dependencies used:
a. Spring Web
b. Spring security
c. postgresql
-
Default users (Admin and User) used for demonstration with following properties:
com.javabeans.username.admin=default_admin com.javabeans.password.admin=admin_1234 com.javabeans.firstname.admin=Admin com.javabeans.lastname.admin=Admin com.javabeans.email.admin=admin@admin.com com.javabeans.username.user=default_user com.javabeans.password.user=user_1234 com.javabeans.firstname.user=User com.javabeans.lastname.user=User com.javabeans.email.user=user@user.com