This project is built during leaning in my university. Main purpose is supporting for my lesson and I has joined 3 process of this project (I mention below)
Project is started from 9/2023 to here, and has 3 team build and maintain it.
- 9/2023 - 1/2024: Project use jsp (FE) and servlet (BE), team members is 3, link
- 1/2024 - 6/2024: Project added bootstrap and lib related to JQuery to handle UI, refactoring folder structure in backend and apply multi new features, team members is 3, link
- 8/2024 - 12/2024: Migration project from servlet to spring boot and use jsp as view engine, team member is 3
- JSP
- Bootstrap 5
- Java 21
- Spring Boot + Spring MVC
- MySQL 8.0
- Cloudinary
-
Clone the repo
git clone https://github.com/ducvui2003/spring-mvc-sell-clothes.git
-
Prepared MySQL Server (8.0)
-
Run file database.sql import data to mysql
-
Configuration database in
src/main/java/com/spring/resources/application.yml
spring: datasource: url: jdbc:mysql://localhost:3306/your_style username: root driver-class-name: com.mysql.cj.jdbc.Driver password: password
-
Install lib in maven
mvn clean install
-
Run project
mvn spring-boot:run
Open http://localhost:8080 in a browser.
Check application.properties for a custom port.
-
Build target external
./mvnw clean package -DskipTests
-
Build image by Dockerfile
docker build -t spring-mvc-web-sell:1.0
-
Run docker compose
docker-compose --env-file .env --profile web-sell up --build
Open http://localhost:8080 in a browser.
Role
- ADMIN
- USER
Table Features
Features | Module | Role |
---|---|---|
Login | Auth | ALL |
Register | Auth | ALL |
Logout | Auth | ALL |
Verify | Auth | USER |
Forget password | Auth | USER |
Reset password | Auth | USER |
Change password | Auth | USER |
Update profile | User | USER |
Update Avatar | User | USER |
Add address (use api address external) | User | USER |
Get products | Product | ALL |
Find products | Product | ALL |
Get product detail | Product | ALL |
Add product to card | Cart | USER, ADMIN |
Change quantity cart item | Cart | USER, ADMIN |
Remove cart item | Cart | USER, ADMIN |
Buy product (payment by cod or vnpay) | Order | USER, ADMIN |
Check history order | Order | USER, ADMIN |
Manage Order (update status) | Admin | ADMIN |
Manage Product (find, create, update, block) | Admin | ADMIN |
Manage User (block) | Admin | ADMIN |