Subscribe to Continue Downloading

Redirecting...
Code Ung dung Web Ban Hang Live Food su dung Java Spring Boot - Code Ứng dụng Web Bán Hàng Live Food sử dụng Java Spring Boot

Code Ứng dụng Web Bán Hàng Live Food sử dụng Java Spring Boot

by Tran Giain , on November 6, 2024

Choose Your Desired Option(s)

Code Ứng dụng Web Bán Hàng Live Food sử dụng Java Spring Boot

SYSTEM REQUIREMENT

  • Java 17 or lastest
  • Apache Maven 3.8.8
  • MySQL ver 8.4.0

This is my setup

TECHNOLOGY

  • Spring Boot, Spring Security with JWT, Spring JPA
  • Springdoc Swagger, Lombok, MySQL

Code Ung dung Web Ban Hang Live Food su dung Java Spring Boot - Code Ứng dụng Web Bán Hàng Live Food sử dụng Java Spring Boot

 

Code Ung dung Web Ban Hang Live Food su dung Java Spring Boot 2 - Code Ứng dụng Web Bán Hàng Live Food sử dụng Java Spring Boot

 

Code Ung dung Web Ban Hang Live Food su dung Java Spring Boot 3 - Code Ứng dụng Web Bán Hàng Live Food sử dụng Java Spring Boot

installation instructions:

download source code

  • Move to the APP DIRECTORY
cd LiveFood
 
  • Create a new MySQL Database
  • Change to your Data URL and fill in username, password.
spring.datasource.url=jdbc:HERE
spring.datasource.username=HERE
spring.datasource.password=HERE
 

This is my URL JDBC URL: spring.datasource.url=jdbc:mysql://localhost:3306/livefood

  • Install dependency throught Maven
mvn clean install
 
  • Run app or Run ClientApplication.java from your IDE
mvn spring-boot:run
 

API ENDPOINTS

GET /api/user/

  • Description: Get all user information.
  • Response: 200 – OK

POST /api/user/register/

  • Description: Send a register request
  • Body Parameters:
{
mail: “[email protected]”,
username: “example”,
password: “example”
}
 
  • Response: 201 – CREATED
  • Error Codes:
    • 409 – CONFLICT: Register information unvalid
    • 409 – CONFLICT: Username or Mail existed

GET /api/user/{id}

  • Description: Get user information with ID.
  • Path Parameters:
/api/user/USER_ID
 
  • Response: 200 – OK

DELETE /api/user/{id}

  • Description: Send a delete id user
  • Path Parameters:
/api/user/USER_ID
 
  • Response: 200 – OK
  • Error Codes:
    • 409 – CONFLICT: ID User unexist

GET /api/user/search

  • Description: Search with username or mail.
  • Param Parameters:

Name ParamTypeDescriptionRequiredusernamestringUser nameFALSEmailstringUser mail addressFALSE

 

  • Response: 200 – OK

PUT /api/user/updateWithNameAndMail/{id}

  • Description: Send a delete id user
  • Body Parameters:
{
username: “example”,
mail: “[email protected]
}
 
  • Response: 200 – OK
  • Error Codes:
    • 400 – BAD REQUEST: Invalid update data
    • 404 – NOT FOUND: User information unexist

GET /api/product/

  • Description: Get all Product Information.
  • Response: 200 – OK

POST /api/product/add/

  • Description: Send an add product request
  • Body Parameters:
{
name: “Coconut”,
price: 120.2,
category: “FRUIT”
}
 
  • Response: 201 – CREATED
  • Error Codes:
    • 409 – CONFLICT: Register information invalid
    • 409 – CONFLICT: Product name existed

GET /api/product/{id}

  • Description: Get product information with ID.
  • Path Parameters:
/api/product/PRODUCT_ID
 
  • Response: 200 – OK

DELETE /api/user/{id}

  • Description: Send a delete id user
  • Path Parameters:
/api/product/PRODUCT_ID
 
  • Response: 200 – OK
  • Error Codes:
    • 409 – CONFLICT: ID User unexist

GET /api/product/update

  • Description: Send request to update product information.
  • Path Parameters:
/api/product/PRODUCT_ID
 

-Body Parameters:

{
code: “TEMP”,
name: “example”,
price: 120.2,
category : “FRUITS”
}
 
  • Response: 200 – OK
    • Error Codes:
    • 400 – BAD REQUEST: Invalid update data
    • 404 – NOT FOUND: ID Product unexist

GET /api/media/getMedia

  • Description: Get Media Information.
  • Response: 200 – OK

GET /api/media/getMedia/{id}

  • Description: Get Media Information with ID
  • Path Parameters:
/api/media/getMedia/MEDIA_ID
 
  • Response: 200 – OK

POST /api/media/uploadproductMedia/{productId}

  • Description: Upload multiple File to Product Media with Product’s ID and save it to DIRECTORY.
  • Param Parameters:

Name ParamTypeDescriptionRequiredfilesFileImage FileTRUE

  • Path Parameters:
/api/media/uploadproductMedia/PRODUCT_ID
 
  • Response: 200 – OK
  • Error Codes:
    • 404 – NOT FOUND: Product unexist
    • *500 – INTERNAL SERVER ERROR: Image upload failed
Download Category ,
Product Version
File Type JAVA, . . .
File Size 18.3 MB
Developer
Documentation

Release Information

  • Released
    :

    November 6, 2024

  • Last Updated
    :

    November 6, 2024

  • Categories
    :
  • File Included
    :

    JAVA, . . .

  • File Size
    :

    18.3 MB

Share Your Valuable Opinions

You must log in to submit a review.

  • Sign up
Password Strength Very Weak
Lost your password? Please enter your username or email address. You will receive a link to create a new password via email.
We do not share your personal details with anyone.

Please wait a moment...

(Don't refresh or go back)