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