Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mukul273/spring-data-rest-jpa-demo
Spring Data Rest JPA Demo
https://github.com/mukul273/spring-data-rest-jpa-demo
data jpa rest spring spring-boot spring-mvc
Last synced: about 2 months ago
JSON representation
Spring Data Rest JPA Demo
- Host: GitHub
- URL: https://github.com/mukul273/spring-data-rest-jpa-demo
- Owner: mukul273
- Created: 2018-04-14T16:45:35.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-04-14T16:48:46.000Z (almost 7 years ago)
- Last Synced: 2024-11-05T23:12:06.629Z (3 months ago)
- Topics: data, jpa, rest, spring, spring-boot, spring-mvc
- Language: Java
- Size: 2.93 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Simple tutorial to use Spring JPA Data Rest
1. Create the project with web, devtools, jpa, h2(in memory database) etc,
2. Create a controller with endpoints
4. Create a repository to get data from database
5. Create model components,
6. Repository class should have business method to fetch the data from database. This method is implicitely converted into select query by JPA since we have repository returning the entity class(model class POJO) which is representing the database table row,
7. Load the data like using the Postmapping method we have defined,
8. Use {"name": "MrsChimp", "Salary": "5000"} to post the data.