This application illustrate how to use Spring Boot MVC to design a secure web application
Watch the Application Explanation Video on YouTube
After successfully running the application on your local machine, you should be able to perform the following functionalities:
- Admin user should be able to create, edit, and delete products
- User should be able to sign up and create products
- Editor should be able to edit products
- Creator should be able to create products
This application uses the following spring boot tech stack.
- Spring Boot MVC
- Spring Data
- Spring Unit Test
- Spring Security
To setup the application locally, you need to setup MySQL and prepare some data in advance.
You can download and install MySQL Workbench on your local machine and create a database.
-
product_management database schema should contain the following tables in the screenshot below.
- product table
- roles table
- users table
- users_roles table
- Insert the test data into the tables below
- product - use the reference file products_table_data.csv
- roles - use the reference file roles_table_data.csv
- users - use the reference file users_table_data.csv
- users_roles - use the reference file users_roles_table_data.csv
in the terminal, run the command below to execute the unit test
mvn clean install
The unit test should pass, and you should see BUILD SUCCESS on the terminal console.
Navigate to the root of the project via command line and execute the command
mvn spring-boot:run
The application should run successfully,and you should be able to use the application on your localhost .
http://localhost:8089