http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-2.xsd
Data Access and Persistence for Spring Framework 6 and Boot 3
Use the popular Spring Data project for data access and persistence using various Java-based APIs such as JDBC, JPA, MongoDB, and more. This book shows how to easily incorporate data persistence and accessibility into your microservices, cloud-native applications, and monolithic enterprise applications. It also teaches you how to perform unit and performance testing of a component that accesses a database. And it walks you through an example of each type of SQL and NoSQL database covered. After reading this book, you'll be able to create an application that interacts with one or multiple types of databases, and conduct unit and performance testing to analyze possible problems. Source code is available on GitHub. What You'll Learn Become familiar with the Spring Data project and its modules for data access and persistence Explore various SQL and NoSQL persistence types Uncover the persistence and domain models, and handle transaction management for SQL Migrate database changes and versioning for SQL Dive into NoSQL persistence with Redis, MongoDB, Neo4j, and Cassandra Handle reactive database programming and access with R2DBC and MongoDB Conduct unit, integration, and performance testing, and more Who This Book Is For Experienced Java software application developers; programmers with experience using the Spring framework or the Spring Boot micro framework.
Intro -- Table of Contents -- About the Author -- About the Technical Reviewer -- Acknowledgments -- Introduction -- Part I: Introduction -- Chapter 1: Application Architecture -- Why Persistence Is So Important -- The History of Persistence -- JDBC -- JDBC Driver -- Type 1: The JDBC-ODBC Bridge -- Type 2: Client Based -- Type 3: Two-Tier Architecture -- Type 4: Wire Protocol Drivers -- How to Connect with a Database -- EJB -- EJB Types -- JPA -- Spring Data -- Object Mapping -- Repository Support -- Architectures Types -- Layers -- Benefits -- Drawbacks -- Hexagonal -- Components -- Benefits
Drawbacks -- Persistence Design Patterns -- Data Access Object (DAO) -- Repository Pattern -- Data Transfer Object (DTO) -- Specification Pattern -- Other Patterns -- Summary -- Chapter 2: Spring Basics and Beyond -- Spring Basics -- Spring Boot -- Basic Application Setup -- Creating an API Using Spring Initialzr -- Creating an API in the IDE -- How to Run the Application -- Best Practices -- Preventing Conflicts with the Dependencies -- Documenting the Endpoints -- Logging All the Details -- Maintaining and Updating the Dependencies -- Summary
Chapter 3: Spring Data and Different Types of Persistence -- What Is Spring Data? -- How Does Spring Data Work? -- Spring Data Code Example -- Core Concepts -- Object Mapping -- Repositories -- Automatic Custom Queries -- Manual Custom Queries -- Implementing Repository Methods -- Summary -- Part II: SQL Persistence -- Chapter 4: Persistence and Domain Model -- JPA Configuration Using Annotations -- Entity -- Columns -- Primitive Types -- Character Types -- Date and time types -- Binary Types -- Other Types -- Non-Persistent Attributes -- Primary Key and Generators -- Types of Relationships
Lazy and Eager Loading -- Ordering -- Types of Inherence -- Mapped Superclass -- Table per Class Hierarchy -- Table per Subclass with Joins -- Table per Class -- Embeddable Class -- Listening and Auditing Events -- Validating the Schema -- Summary -- Chapter 5: Transaction Management -- What Is a Transaction? -- What Is ACID? -- Isolation Problems -- Isolation Levels -- Locking Types -- How Do These Concepts Work in Spring Data? -- Transactional Properties -- Transaction Template -- Optimistic Locking -- Summary -- Chapter 6: Versioning or Migrating Changes -- Versioning Changes in a Database
Libraries That Implement Versioning -- Flyway -- Liquibase -- Which Library Does the Versioning? -- Integrating Libraries in Spring Boot -- Liquibase -- Flyway -- Best Practices -- Feature Flags -- Implementing Feature Flags -- Including a Header -- Including a Library -- Best Practices -- Summary -- Part III: NoSQL Persistence -- Chapter 7: Redis: Key/Value Database -- What Is Redis? -- Spring Data Structures -- Database and Connection Settings -- Connecting with Primary/Secondary Nodes -- Object Mapping and Conversion -- Defining Custom Repositories -- Queries by Example -- Summary