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