https://github.com/codebanesr/springservice-mysql
https://github.com/codebanesr/springservice-mysql
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/codebanesr/springservice-mysql
- Owner: codebanesr
- Created: 2018-08-20T11:13:56.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-20T11:52:16.000Z (almost 8 years ago)
- Last Synced: 2025-03-13T16:16:29.377Z (about 1 year ago)
- Language: Java
- Size: 49.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
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 Product-Registration 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**
I just manipulated some methods to work according to my needs, original tutorial is at :
```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/products
POST /api/product
GET /api/products/{productId}
PUT /api/notes/{productId}
DELETE /api/notes/{productId}
You can test them using postman or any other rest client.
## Learn more
You can find the tutorial for this application on the blog -