{"id":17838136,"url":"https://github.com/jevin31/spring-boot-rest-api","last_synced_at":"2025-04-02T13:47:14.880Z","repository":{"id":259412939,"uuid":"877803838","full_name":"jevin31/spring-boot-rest-api","owner":"jevin31","description":"This is a simple demo of how to create a REST API using Spring Boot, PostgreSQL, and JPA","archived":false,"fork":false,"pushed_at":"2024-10-24T10:54:51.000Z","size":30,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-08T04:45:59.238Z","etag":null,"topics":["java","maven","postgresql","postmen","springboot"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jevin31.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-24T09:14:41.000Z","updated_at":"2024-10-24T10:54:55.000Z","dependencies_parsed_at":"2024-10-25T06:58:47.881Z","dependency_job_id":"7883fe69-e9a0-4c16-a540-d1fdb166f59a","html_url":"https://github.com/jevin31/spring-boot-rest-api","commit_stats":null,"previous_names":["jevin31/spring-boot-rest-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jevin31%2Fspring-boot-rest-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jevin31%2Fspring-boot-rest-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jevin31%2Fspring-boot-rest-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jevin31%2Fspring-boot-rest-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jevin31","download_url":"https://codeload.github.com/jevin31/spring-boot-rest-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246827758,"owners_count":20840464,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","maven","postgresql","postmen","springboot"],"created_at":"2024-10-27T20:52:26.514Z","updated_at":"2025-04-02T13:47:14.863Z","avatar_url":"https://github.com/jevin31.png","language":"Java","readme":"# Spring Boot REST API with PostgreSQL\n\nThis project demonstrates how to create a simple REST API using Spring Boot, PostgreSQL, and JPA. The API allows for basic CRUD (Create, Read, Update, Delete) operations on a product entity.\n\n## Table of Contents\n\n- [Technologies Used](#technologies-used)\n- [Installation](#installation)\n- [Usage](#usage)\n- [API Endpoints](#api-endpoints)\n- [License](#license)\n\n## Technologies Used\n\n- **Java**: 21\n- **Spring Boot**: Latest version\n- **PostgreSQL**: Database\n- **Maven**: Project management and build tool\n- **Eclipse**: IDE for Java development\n\n## Installation\n\n1. **Clone the Repository**:\n   ```bash\n   git clone https://github.com/yourusername/springapi.git\n   cd springapi\n2. **Create PostgreSQL Database**:\n\n   Open your PostgreSQL client and create a new database.\n   ```sql\n   CREATE DATABASE springapidb;\n\n4. **Configure Application Properties**:\n\n   Update the src/main/resources/application.properties file with your PostgreSQL database credentials.\n   ```java\n   spring.datasource.url=jdbc:postgresql://localhost:5432/springapidb\n   spring.datasource.username=your_postgresql_username\n   spring.datasource.password=your_postgresql_password\n   spring.jpa.hibernate.ddl-auto=update\n   spring.jpa.show-sql=true\n\n6. **Build the Project**:\n\n   Make sure you have Maven installed. Run the following command in your project directory.\n   ```bash\n   mvn clean install\n   \n8. **Run the Application**:\n\n   You can run the application from your IDE (Eclipse) or use the command line.\n   ```bash\n   mvn spring-boot:run\n\n## Usage\nOnce the application is running, you can interact with the API using a tool like Postman or Curl.\n\n## API Endpoints\nCreate a Product (POST):\n\nURL: `http://localhost:8080/api/v1/products`\n\n\nRequest Body (JSON):\n```json\n{\n    \"name\": \"Product 1\",\n    \"price\": 100.0,\n    \"quantity\": 10\n}\n```\n\nGet All Products (GET):\n\nURL: `http://localhost:8080/api/v1/products`\n\nGet a Product by ID (GET):\n\nURL: `http://localhost:8080/api/v1/products/{id}`\n\nDelete a Product (DELETE):\n\nURL: `http://localhost:8080/api/v1/products/{id}`\n\n## License\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjevin31%2Fspring-boot-rest-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjevin31%2Fspring-boot-rest-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjevin31%2Fspring-boot-rest-api/lists"}