使用 Spring Data Repositories

Spring Data repository 抽象化的目標是大幅減少實作各種持久層資料存取層所需的樣板程式碼。

Spring Data repository 文件與您的模組

本章節說明 Spring Data repository 的核心概念與介面。本章節的資訊來自 Spring Data Commons 模組。它使用 Jakarta Persistence API (JPA) 模組的組態與程式碼範例。如果您想要使用 XML 組態,您應該調整 XML 命名空間宣告以及要擴充的類型,使其等同於您使用的特定模組。「命名空間參考」涵蓋 XML 組態,所有支援 repository API 的 Spring Data 模組均支援此組態。「Repository 查詢關鍵字」涵蓋 repository 抽象化普遍支援的查詢方法關鍵字。如需您的模組特定功能的詳細資訊,請參閱本文件關於該模組的章節。