×

Genuine Coder's video: Spring Boot MySQL Database Setup with JPA Chapter 2

@Spring Boot MySQL Database Setup with JPA | Chapter #2
In this tutorial, we will explore how to use the spring boot CRUD repository to easily create, retrieve, update and delete database objects. First, we will add a new database Entity model and set up an auto-incremented integer primary key for the model. In Spring JPA, you can add @Entity annotation to mark a class as a database entity. It will then be automatically taken by the Spring JPA and a database table will be created for the same. Then, we will create a CRUD repository by extending org.springframework.data.repository.CrudRepository and use it in a DAO (Data Access Object) class. Spring boot CRUD provides many functions that can be used directly without having to write any code. For example, the save(T entity) function saves an entity model to the database, and we don't have to write any special code to do that. After setting up the CRUD Repository and the DAO class, we will write a unit test to make sure that the repository is indeed working as expected. You can find this project in GitHub at https://github.com/afsalashyana/Spring-boot-tutorial Genuine Coder Blog: https://www.genuinecoder.com/ Tags: Introduction: (0:00) Create new Employee JPA Entity: (01:01) Configure Spring Boot Component Scan: (05:55) Create new CRUD Repository: (09:36) Setting up DAO (Data Access Object): (12:02) Test the repository: (18:13)

121

6
Genuine Coder
Subscribers
21.9K
Total Post
194
Total Views
686.4K
Avg. Views
11.8K
View Profile
This video was published on 2022-03-16 10:00:24 GMT by @Genuine-Coder on Youtube. Genuine Coder has total 21.9K subscribers on Youtube and has a total of 194 video.This video has received 121 Likes which are lower than the average likes that Genuine Coder gets . @Genuine-Coder receives an average views of 11.8K per video on Youtube.This video has received 6 comments which are lower than the average comments that Genuine Coder gets . Overall the views for this video was lower than the average for the profile.Genuine Coder #Java #SpringBoot Introduction: has been used frequently in this Post.

Other post by @Genuine Coder