🔗 Hogwarts Artifacts Online user stories: https://xmind.app/m/A2Spvq
🔗 Hogwarts Artifacts Online API document: https://app.swaggerhub.com/apis/Washingtonwei/hogwarts-openapi/3.0.0
🔗 GitHub repository: https://github.com/Washingtonwei/hogwarts-artifacts-online/tree/specifications
"Finding something by search criteria", "Searching with filters", or "Faceted search" is common in web applications. It enables users to quickly and efficiently find items or information that meet their specific needs and interests. In this video, we are exploring a powerful feature of Spring Data JPA: Specifications for constructing dynamic database queries so that users can narrow down their search results.
00:00 Introduction
03:05 New "find artifacts by search criteria" API endpoint in SwaggerHub
05:31 Problems with query methods
09:13 Dynamic query with specifications
11:49 Implementing ArtifactsSpecs class
21:54 Modifying the ArtifactRepository interface
23:34 Implementing findAritfactsByCriteria controller method
28:42 Implementing findByCriteria service method
35:28 Modifying the SecurityConfiguration class
36:19 Testing in Postman
38:16 Understanding the generated SQL statement
39:05 Writing integration tests
45:35 Committing and pushing changes to GitHub
47:42 Conclusion
This video belongs to a playlist "Learn Spring Boot 3 with Bingyang": https://www.youtube.com/playlist?list=PLqq9AhcMm2oPdXXFT3fzjaKLsVymvMXaY
I don't want to make a super long video so I split it into smaller ones. If you want to learn Spring Boot 3 systematically, please visit the playlist (and save the playlist) for more Spring Boot 3 tutorials.
Feel free to leave a comment if you have any questions.
As always, thanks for watching, and happy learning!