Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ulisses22/api-restful-spring-boot-postgresql

API for managing products, built with Spring Boot and PostgreSQL
https://github.com/ulisses22/api-restful-spring-boot-postgresql

api java postgresql spring-boot

Last synced: 1 day ago
JSON representation

API for managing products, built with Spring Boot and PostgreSQL

Awesome Lists containing this project

README

        

# Spring Boot Product API

This is a CRUD (Create, Read, Update, Delete) API for managing products, built with Spring Boot and PostgreSQL.

## Prerequisites

- Java 8 or higher
- Maven
- PostgreSQL

## Built With

- Spring Boot
- PostgreSQL
- Maven
- Hibernate

## Getting Started

To run this project locally, follow these steps:

1. Clone the repository:

```sh
git clone
```

2. Navigate to the project directory:

```sh
cd
```

3. Update the database connection configuration in application.properties:

```sh
spring.datasource.url=jdbc:postgresql://localhost:5432/products-api
spring.datasource.username=USER_NAME
spring.datasource.password=USER_PASSWORD
spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
```

4. Build the project:
```sh
mvn clean install
```
5. Run the application:
```sh
java -jar target/.jar
```
## API Endpoints

- POST/products
- GET/products
- GET/products/{id}
- PUT/products/{id}
- DELETE/products/{id}

##### Replace ``, ``, ``, with appropriate values.
##### Make sure to have Java, Maven, and PostgreSQL installed before running the project. You can configure the database connection details in `application.properties`.