Summary

Spring Boot makes the development of Spring-based applications easy. Spring Data makes it easy to connect to different data stores.

In this chapter, we looked at Spring Data in depth.

We started by looking at Spring Data Commons, which provides the common interfaces and APIs that makes Spring Data easyRepository, CrudRepository, and PagingAndSortingRepository.

We looked at connecting to a relational database using Spring Data JPA. We used an in-memory database, H2. We created a simple repository to perform CRUD operations. We implemented paging and sorting features. We learned how to create custom query methods and JPQL queries in a repository.

After that, we created a project connecting to a big data database, MongoDB, using Spring Data MongoDB. We saw that interacting with a big data database was no different from talking with a relational database.

That's the magic of Spring Data. It provides a consistent approach to talk to a variety of data stores.

As monolith applications grew bigger and more unmaintainable, a change was needed. In the next chapter, let's shift our attention toward microservice architectures.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset