Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

15 Commits

Folders and files

Repository files navigation

BC Java - Assignment 09 - RESTful API

Status Java IntelliJ IDEA

Requirements

Question 1: API Hello World (Onboarding task)

Question 2: Service Greeting (Dependency Injection)

Question 3: API Máy tính đơn giản (Calculator)

Question 4: Quản lý sản phẩm (Product CRUD – In-Memory)

Question 5: Quản lý sinh viên (Student API)

Question 6: Tạo Bean Config thủ công (AppConfig)

Question 7: Tìm kiếm sách (Book Search API)

Question 8: Quản lý nhân viên (Employee + Exception Handling)

Question 9: Kiến trúc chuẩn 3 Layer (Customer API)

  • Problem:
    • Tech lead muốn project chia đúng tầng:
      • Controller: nhận request.
      • Service: xử lý logic.
      • Repository: quản lý dữ liệu (In-memory).
      • Entity Customer(id, name, phone).
  • Solution: Full source: Question 9
  • URL:

Question 10: Quản lý đơn hàng (Order với Product – OneToMany)

  • Problem:
    • Khách hàng muốn API quản lý Order.
      • Entity Order(id, customerName, List).
      • POST /orders → tạo order với danh sách sản phẩm.
      • GET /orders → trả về toàn bộ order.
  • Solution: Full source: Question 10

Prerequisites

Project Structure

./
│   .gitattributes
│   .gitignore
│   HELP.md
│   mvnw
│   mvnw.cmd
│   pom.xml
│   README.md
│
├───.mvn
│   └───wrapper
└───src
    └───main
        ├───java
        │   └───com
        │       └───cybersoft
        │           └───restfulapi
        │               ├───question1
        │               ├───question2
        │               │   ├───controller
        │               │   └───service
        │               ├───question3
        │               │   ├───controller
        │               │   └───service
        │               ├───question4
        │               │   ├───controller
        │               │   ├───dto
        │               │   ├───model
        │               │   ├───repository
        │               │   └───service
        │               ├───question5
        │               │   ├───controller
        │               │   ├───model
        │               │   └───service
        │               ├───question6
        │               │   ├───controller
        │               │   └───service
        │               ├───question7
        │               │   ├───controller
        │               │   ├───model
        │               │   └───service
        │               ├───question8
        │               │   ├───controller
        │               │   ├───exception
        │               │   ├───model
        │               │   └───service
        │               ├───question9
        │               │   ├───controller
        │               │   ├───model
        │               │   ├───repository
        │               │   └───service
        │               └───question10
        │                   ├───controller
        │                   ├───model
        │                   ├───repository
        │                   └───service
        └───resources
            └───application.properties

Environment

  • IDE: IntelliJ
  • Java 21

Author

Khang Nguyen

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages