Skip to content

DrDmlg/product-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

Product Manager

Spring Boot CRUD Application

This repository contains a simple Spring Boot application implementing CRUD (Create, Read, Update, Delete) operations for managing categories and products. The application is built on the Spring framework and uses a PostgreSQL database.

Project Structure

Controller:

  • CategoryController: Handles requests related to categories.
  • ProductController: Manages product-related requests.

DTO (Data Transfer Object):

  • ProductDTO: A DTO for transferring product-related data.

Entity:

  • Category: Represents a category entity.
  • Product: Represents a product entity, including a many-to-one relationship with Category.

Repository:

  • CategoryRepository: JPA repository for the Category entity.
  • ProductRepository: JPA repository for the Product entity.

Service:

  • CategoryService: Provides business logic for category-related operations.
  • ProductService: Manages product-related business logic, including creating, reading, updating, and deleting products.

How to Run

Endpoints

Categories:

  • GET /categories: Retrieve all categories.
  • DELETE /categories/delete/{id}: Delete a category by ID.

Products:

  • POST /products: Create a new product.
  • GET /products: Retrieve all products.
  • GET /products/category/{id}: Retrieve products by category ID.
  • PUT /products: Update a product.
  • DELETE /products/delete/{id}: Delete a product by ID.

Contributing

Feel free to fork this repository, make changes, and submit a pull request. Contributions are welcome!

Contact

If you have any questions or suggestions, feel free to reach out to me at dorokhov.did@gmail.com or through my GitHub page.

About

REST API application for managing goods and product categories

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages