Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/callicoder/spring-boot-mysql-rest-api-tutorial
Building a Restful CRUD API using Spring Boot, Mysql, JPA and Hibernate
https://github.com/callicoder/spring-boot-mysql-rest-api-tutorial
crud-api hibernate jpa mysql rest-api spring spring-data-jpa spring-mvc tutorial
Last synced: 6 days ago
JSON representation
Building a Restful CRUD API using Spring Boot, Mysql, JPA and Hibernate
- Host: GitHub
- URL: https://github.com/callicoder/spring-boot-mysql-rest-api-tutorial
- Owner: callicoder
- Created: 2017-06-27T13:31:50.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-05-06T07:35:36.000Z (9 months ago)
- Last Synced: 2025-01-08T03:18:21.311Z (13 days ago)
- Topics: crud-api, hibernate, jpa, mysql, rest-api, spring, spring-data-jpa, spring-mvc, tutorial
- Language: Java
- Homepage: https://www.callicoder.com/spring-boot-rest-api-tutorial-with-mysql-jpa-hibernate/
- Size: 58.6 KB
- Stars: 421
- Watchers: 20
- Forks: 439
- Open Issues: 11
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Spring Boot, MySQL, JPA, Hibernate Rest API Tutorial
Build Restful CRUD API for a simple Note-Taking application using Spring Boot, Mysql, JPA and Hibernate.
## Requirements
1. Java - 1.8.x
2. Maven - 3.x.x
3. Mysql - 5.x.x
## Steps to Setup
**1. Clone the application**
```bash
git clone https://github.com/callicoder/spring-boot-mysql-rest-api-tutorial.git
```**2. Create Mysql database**
```bash
create database notes_app
```**3. Change mysql username and password as per your installation**
+ open `src/main/resources/application.properties`
+ change `spring.datasource.username` and `spring.datasource.password` as per your mysql installation
**4. Build and run the app using maven**
```bash
mvn package
java -jar target/easy-notes-1.0.0.jar
```Alternatively, you can run the app without packaging it using -
```bash
mvn spring-boot:run
```The app will start running at .
## Explore Rest APIs
The app defines following CRUD APIs.
GET /api/notes
POST /api/notes
GET /api/notes/{noteId}
PUT /api/notes/{noteId}
DELETE /api/notes/{noteId}You can test them using postman or any other rest client.
## Learn more
You can find the tutorial for this application on my blog -