In this Spring Data MongoDB Example, we will build a Simple Spring Application and perform CRUD operations on the Mongo Database with the help of Spring Data MongoDB and MongoRepository. MongoDB is a document-based NoSQL database, providing high performance and high availability. Spring provides seamless integration with the Mongo database through Spring Data MongoDB which is a … [Read more...]
Spring Data REST Example – Spring Boot RESTful API + CRUD
Spring Data REST is built on top of the Spring Data repositories and it automatically exposes the repositories as REST services. Spring Data REST takes the features of Spring HATEOAS and Spring Data JPA and combines them together, using a Strategy called "RepositoryDetectionStrategy" to export the repository as a REST resource. In this Spring Data REST Example, let's create a … [Read more...]
Spring Data JPA CRUD Example using JpaRepository
In this article, we will learn how to integrate Spring Data JPA into our Spring application. We will be extending JPARepository and be creating an Employee management application and store the details using Oracle database. … [Read more...]
Spring Boot CRUDRepository Example- Spring Data JPA
In this article, we will learn how to integrate Spring Data JPA into our Spring Boot application. We will be extending CrudRepository which in turn extends the Repository interface and hence there is no need for implementing our own methods. We will be creating a Student management application and store the details using Oracle database. … [Read more...]
Spring Data JPA Many To Many Foreign Key Example
Previously we have learnt how to do One To One and One To Many Mapping using Spring Data JPA, in this article, we will learn about Spring Data JPA Many to Many mapping. Let's take the Example of Employee and Address, one Employee can have many Address and similarly, one Address can have many Employees. Let's dig into the code. … [Read more...]
Spring Data JPA One To Many Foreign Key Example
In this Spring Data JPA One To Many article, we will learn how to achieve One To Many Mapping using Spring Data JPA. In this approach, we will re-use the same two tables which we used in our previous Spring Data JPA One To One Example. … [Read more...]
Spring Data JPA One To One Foreign Key Example
In this Spring Data JPA One To One article, we will learn how to achieve One To One Mapping using Spring Data JPA. In this approach, we will have two tables with different primary keys. The primary key of EMPLOYEE table (EMP_ID) will act as a foreign key for the EMPLOYEE_ADDRESS table and EMPLOYEE_ADDRESS table will have its own primary key (ADDR_ID). … [Read more...]