https://github.com/hendisantika/spring-boot-rest-api-postgresql
Plain RESTful Web Service with Spring Boot. Using PostgreSQL database, Hibernate and basic authentication.
https://github.com/hendisantika/spring-boot-rest-api-postgresql
Last synced: 8 months ago
JSON representation
Plain RESTful Web Service with Spring Boot. Using PostgreSQL database, Hibernate and basic authentication.
- Host: GitHub
- URL: https://github.com/hendisantika/spring-boot-rest-api-postgresql
- Owner: hendisantika
- Created: 2019-01-18T15:02:17.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2025-04-08T22:28:20.000Z (9 months ago)
- Last Synced: 2025-04-08T23:26:03.306Z (9 months ago)
- Language: Java
- Size: 1.14 MB
- Stars: 7
- Watchers: 2
- Forks: 30
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# spring-boot-rest-api-postgresql
#### Plain REST API CRUD with Spring Boot and PostgreSQL.
Technology stack:
* Spring Boot;
* Spring Web;
* Spring Data;
* PostgreSQL database;
* Hibernate;
* Spring Security (as basic authentication).
##### To run this application use:
`mvn clean spring-boot:run`
The view in the Postman:
Add new Book
`POST /api/books`
http://localhost:8080/api/books

Get All Books
`GET /api/books`
http://localhost:8080/api/books

Get Book By Id
`GET /api/books/{id}`
http://localhost:8080/api/books/{id}

Get Book By Name
`GET /api/books?name=name`
http://localhost:8080/api/books?name=name

Delete Book By Id
`DELETE /api/books/{id}`
http://localhost:8080/api/books/{id}

Delete All Books
`DELETE /api/books`
http://localhost:8080/api/books
