A Spring Boot application designed to manage products. This project offers RESTful APIs to create, read, update, and delete products. It demonstrates fundamental Spring Boot functionalities including entity mapping, service layers, and integration with a database.
- Create, update, delete, and retrieve products
- RESTful API for managing product data
- Integration with a database for persistence
- Java: Version 17
- Spring Boot: Version 3.0.0
- Maven: Project build and dependency management
- Hibernate/JPA: For data persistence and ORM
- PostgreSQL: Database used for managing product records
Product-Management-Springboot
├───src
│ ├───main
│ │ ├───java
│ │ │ └───com
│ │ │ └───productmanagement
│ │ │ ├───controller # REST controllers
│ │ │ ├───model # Entities representing the database tables
│ │ │ ├───repository # JPA repositories for data access
│ │ │ └───service # Business logic
│ └───resources
│ └───application.properties # Configuration files
├───test
└───pom.xml # Maven configuration
- Database: PostgreSQL
- Default port:
5432
- Configure the connection settings in
application.properties
:spring.datasource.url=jdbc:postgresql://localhost:5432/productdb spring.datasource.username=your-username spring.datasource.password=your-password
GET /api/products
: Retrieve all productsGET /api/products/{id}
: Retrieve a product by IDPOST /api/products
: Add a new productPUT /api/products/{id}
: Update an existing productDELETE /api/products/{id}
: Delete a product by ID
- Java 17
- Maven
- PostgreSQL
- Clone the repository:
git clone https://github.com/xreedev/Product-Management-Springboot.git cd Product-Management-Springboot
- Configure the database in
application.properties
. - Run the application:
mvn spring-boot:run
Use Postman or any API client to test the REST endpoints.