https://github.com/thecomponent/restful-apis-java
RESTful API for learning 🫛
https://github.com/thecomponent/restful-apis-java
java restful-api spring spring-boot
Last synced: about 2 months ago
JSON representation
RESTful API for learning 🫛
- Host: GitHub
- URL: https://github.com/thecomponent/restful-apis-java
- Owner: TheComponent
- License: apache-2.0
- Created: 2024-10-12T07:27:52.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-15T06:33:37.000Z (over 1 year ago)
- Last Synced: 2025-04-07T00:52:22.794Z (about 1 year ago)
- Topics: java, restful-api, spring, spring-boot
- Language: Java
- Homepage:
- Size: 24.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# RESTful API with Java and Spring boot 🫛
Just a sample about how to build a RESTful API

### Technology
- Java 21
- Spring 3.3.4
- Maven 3.3.4
- Swagger
- H2 database
### How to run and test API
- Open project and run
- Open Postman to check the APIs
- APIs:
Create product:
```
POST:
localhost:8080/products
Body:
{
"name": "Product",
"description": "A product",
"price": 10.0
}
```
Get product:
```
GET:
localhost:8080/products/1
```
Update product:
```
PUT:
localhost:8080/products/1
Body:
{
"name": "Product updated",
"description": "A product",
"price": 10.0
}
```
Delete product:
```
DELETE:
localhost:8080/products/1
```
Get all products:
```
GET:
localhost:8080/products
```
We learn, we do, we discuss, we improve! 🍁