About the Author |
|
xi | |
About the Technical Reviewer |
|
xiii | |
Acknowledgments |
|
xv | |
Introduction |
|
xvii | |
|
|
1 | (84) |
|
Chapter 1 Application Architecture |
|
|
3 | (34) |
|
Why Persistence Is So Important |
|
|
3 | (1) |
|
The History of Persistence |
|
|
4 | (1) |
|
|
5 | (7) |
|
|
12 | (4) |
|
|
16 | (3) |
|
|
19 | (1) |
|
|
20 | (2) |
|
|
22 | (2) |
|
|
24 | (1) |
|
|
24 | (2) |
|
|
26 | (3) |
|
Persistence Design Patterns |
|
|
29 | (1) |
|
|
29 | (3) |
|
|
32 | (2) |
|
Data Transfer Object (DTO) |
|
|
34 | (1) |
|
|
35 | (1) |
|
|
36 | (1) |
|
|
36 | (1) |
|
Chapter 2 Spring Basics and Beyond |
|
|
37 | (24) |
|
|
37 | (2) |
|
|
39 | (1) |
|
|
40 | (1) |
|
Creating an API Using Spring Initialzr |
|
|
41 | (4) |
|
Creating an API in the IDE |
|
|
45 | (2) |
|
How to Run the Application |
|
|
47 | (10) |
|
|
57 | (1) |
|
Preventing Conflicts with the Dependencies |
|
|
57 | (2) |
|
Documenting the Endpoints |
|
|
59 | (1) |
|
|
59 | (1) |
|
Maintaining and Updating the Dependencies |
|
|
60 | (1) |
|
|
60 | (1) |
|
Chapter 3 Spring Data and Different Types of Persistence |
|
|
61 | (24) |
|
|
61 | (3) |
|
How Does Spring Data Work? |
|
|
64 | (1) |
|
|
64 | (6) |
|
|
70 | (14) |
|
|
84 | (1) |
|
|
85 | (102) |
|
Chapter 4 Persistence and Domain Model |
|
|
87 | (56) |
|
JPA Configuration Using Annotations |
|
|
87 | (4) |
|
|
91 | (16) |
|
|
107 | (13) |
|
|
120 | (12) |
|
Listening and Auditing Events |
|
|
132 | (3) |
|
|
135 | (6) |
|
|
141 | (2) |
|
Chapter 5 Transaction Management |
|
|
143 | (20) |
|
|
145 | (1) |
|
|
146 | (1) |
|
|
147 | (3) |
|
|
150 | (2) |
|
|
152 | (1) |
|
How Do These Concepts Work in Spring Data? |
|
|
152 | (3) |
|
|
155 | (3) |
|
|
158 | (1) |
|
|
159 | (3) |
|
|
162 | (1) |
|
Chapter 6 Versioning or Migrating Changes |
|
|
163 | (24) |
|
Versioning Changes in a Database |
|
|
163 | (3) |
|
Libraries That Implement Versioning |
|
|
166 | (4) |
|
Which Library Does the Versioning? |
|
|
170 | (1) |
|
Integrating Libraries in Spring Boot |
|
|
170 | (8) |
|
|
178 | (1) |
|
|
179 | (2) |
|
Implementing Feature Flags |
|
|
181 | (4) |
|
|
185 | (1) |
|
|
185 | (2) |
|
Part III NoSQL Persistence |
|
|
187 | (78) |
|
Chapter 7 Redis: Key/Value Database |
|
|
189 | (24) |
|
|
189 | (4) |
|
|
193 | (2) |
|
Database and Connection Settings |
|
|
195 | (5) |
|
Connecting with Primary/Secondary Nodes |
|
|
200 | (3) |
|
Object Mapping and Conversion |
|
|
203 | (3) |
|
Defining Custom Repositories |
|
|
206 | (3) |
|
|
209 | (3) |
|
|
212 | (1) |
|
Chapter 8 MongoDB: Document Database |
|
|
213 | (18) |
|
What Is a Document Store? |
|
|
213 | (1) |
|
|
214 | (1) |
|
|
215 | (1) |
|
|
216 | (3) |
|
Introduction Spring Data Mongo |
|
|
219 | (1) |
|
Database and Connection Settings |
|
|
219 | (5) |
|
Access Using Repositories |
|
|
224 | (2) |
|
|
226 | (1) |
|
Using MongoTemplate with Custom Repositories |
|
|
227 | (3) |
|
|
230 | (1) |
|
Chapter 9 Neo4j: Graph Database |
|
|
231 | (18) |
|
What Is a Graph Database? |
|
|
231 | (1) |
|
|
232 | (1) |
|
|
233 | (1) |
|
|
234 | (2) |
|
Introduction Spring Data Neo4j |
|
|
236 | (1) |
|
Database and Connection Settings |
|
|
236 | (5) |
|
Access Using Repositories |
|
|
241 | (6) |
|
|
247 | (2) |
|
Chapter 10 Cassandra: Wide-Column Database |
|
|
249 | (16) |
|
|
249 | (3) |
|
|
252 | (1) |
|
|
253 | (1) |
|
Database and Connection Settings |
|
|
253 | (7) |
|
Defining Custom Repositories |
|
|
260 | (3) |
|
|
263 | (1) |
|
|
264 | (1) |
|
Part IV Advanced testing and best practices |
|
|
265 | (76) |
|
Chapter 11 Reactive Access |
|
|
267 | (10) |
|
|
268 | (1) |
|
Modifying Queries to Be Reactive |
|
|
269 | (1) |
|
|
270 | (2) |
|
|
272 | (3) |
|
|
275 | (1) |
|
|
275 | (2) |
|
Chapter 12 Unit and Integration Testing |
|
|
277 | (22) |
|
|
278 | (3) |
|
Integration Testing with a Database |
|
|
281 | (1) |
|
|
281 | (2) |
|
Testcontainers vs. Embedded |
|
|
283 | (1) |
|
|
284 | (9) |
|
Multiple Integration Tests |
|
|
293 | (1) |
|
Initialization Strategies |
|
|
294 | (1) |
|
|
295 | (3) |
|
|
298 | (1) |
|
Chapter 13 Detecting Performance Issues |
|
|
299 | (26) |
|
|
300 | (1) |
|
|
301 | (1) |
|
Analyzing Query Performance |
|
|
301 | (4) |
|
Analyzing Query Complexity |
|
|
305 | (5) |
|
Checking the Performance of an Endpoint |
|
|
310 | (13) |
|
|
323 | (2) |
|
Chapter 14 Best Practices |
|
|
325 | (16) |
|
|
325 | (7) |
|
Reducing Transferred Information |
|
|
332 | (1) |
|
Using Optional in Custom Queries |
|
|
332 | (1) |
|
Using Lazy in Relationships |
|
|
332 | (1) |
|
Persisting Multiples Elements |
|
|
333 | (1) |
|
Using Master/Slave or Replicas |
|
|
333 | (1) |
|
Using Cache to Reduce Access |
|
|
334 | (6) |
|
|
340 | (1) |
Appendix A Setting up Environment Tools |
|
341 | (8) |
Appendix B Recommended and Alternative Tools |
|
349 | (14) |
Appendix C Opening a Project |
|
363 | (4) |
Appendix D Install and Configure a Relational Database |
|
367 | (16) |
Appendix E Installing and Configuring Non-Relational Databases |
|
383 | (24) |
Appendix F Further Reading |
|
407 | (4) |
Index |
|
411 | |