使用 Spring Data Repositories

Spring Data repository 抽象的目標是顯著減少為各種持久化儲存實現資料訪問層所需的樣板程式碼量。

Spring Data repository 文件和您的模組

本章解釋了 Spring Data repositories 的核心概念和介面。本章中的資訊來自 Spring Data Commons 模組。它使用 Jakarta Persistence API (JPA) 模組的配置和程式碼示例。如果您想使用 XML 配置,您應該將 XML 名稱空間宣告和要擴充套件的型別調整為特定模組的等效項。“名稱空間參考”涵蓋了 XML 配置,所有支援 repository API 的 Spring Data 模組都支援 XML 配置。“Repository 查詢關鍵字”涵蓋了 repository 抽象通常支援的查詢方法關鍵字。有關模組特定功能的詳細資訊,請參閱本文件中關於該模組的章節。