This chapter covers
- Introducing Spring Data, its needs, and various Spring Data modules
- Configuring a relational database, NoSQL database (MongoDB), and access data in a Spring Boot application
- Enabling Spring Data JPA to manage business domain objects with relational databases
- Various techniques to access data from a relational database using @NamedQuery, @Query, Criteria API, and Querydsl
You’ve already explored a variety of topics on Spring Boot in the last two chapters. With a solid overview of Spring Boot, you’ve learned a few common tasks that you may use in your Spring Boot applications quite frequently. So what’s next? In today’s world, most applications are incomplete without a database that stores the application data. Spring Boot applications are no exception. In this chapter, you’ll boot your journey by interacting with the database from your Spring Boot application. You’ll explore how seamless it is to perform database configuration, complete initialization, access data, and manage business objects in the database with Spring Boot!
Spring Data (https://spring.io/projects/spring-data) lets you access data from a variety of data sources (e.g., relational and nonrelational databases, MapReduce databases, and cloud-based data services). It attempts to provide a uniform, easy-to-use, and familiar programming model through the Spring Framework.