Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/callicoder/spring-boot-postgresql-jpa-hibernate-rest-api-demo
Building RESTful APIs with Spring Boot, PostgreSQL, JPA and Hibernate
https://github.com/callicoder/spring-boot-postgresql-jpa-hibernate-rest-api-demo
hibernate jpa postgres postgresql rest rest-api spring spring-boot
Last synced: 4 days ago
JSON representation
Building RESTful APIs with Spring Boot, PostgreSQL, JPA and Hibernate
- Host: GitHub
- URL: https://github.com/callicoder/spring-boot-postgresql-jpa-hibernate-rest-api-demo
- Owner: callicoder
- Created: 2018-04-30T10:21:38.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-06-04T15:38:55.000Z (over 2 years ago)
- Last Synced: 2024-04-11T15:33:50.301Z (7 months ago)
- Topics: hibernate, jpa, postgres, postgresql, rest, rest-api, spring, spring-boot
- Language: Java
- Homepage: https://www.callicoder.com/spring-boot-jpa-hibernate-postgresql-restful-crud-api-example/
- Size: 52.7 KB
- Stars: 271
- Watchers: 9
- Forks: 152
- Open Issues: 6
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
## Spring Boot, PostgreSQL, JPA, Hibernate REST API Demo
## Tutorial
Check out the complete tutorial on the CalliCoder blog -
[Spring Boot, PostgreSQL, JPA, Hibernate RESTful CRUD API Example](https://www.callicoder.com/spring-boot-jpa-hibernate-postgresql-restful-crud-api-example/)
## Steps to Setup
**1. Clone the repository**
```bash
git clone https://github.com/callicoder/spring-boot-postgresql-jpa-hibernate-rest-api-demo.git
```**2. Configure PostgreSQL**
First, create a database named `postgres_demo`. Then, open `src/main/resources/application.properties` file and change the spring datasource username and password as per your PostgreSQL installation.
**3. Run the app**
Type the following command from the root directory of the project to run it -
```bash
mvn spring-boot:run
```Alternatively, you can package the application in the form of a JAR file and then run it like so -
```bash
mvn clean package
java -jar target/postgres-demo-0.0.1-SNAPSHOT.jar
```