使用 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 模組都支援此組態。「Repository 查詢關鍵字」涵蓋 repository 抽象化普遍支援的查詢方法關鍵字。如需有關您的模組特定功能的詳細資訊,請參閱本文件的該模組章節。