1、默認的Repository Controller自帶的查詢機制滿足我大多數查詢問題;
2、目前我需要擴展Controller回傳Spring HATEOAS 格式的功能,如何實作?
XXXRepository 層已經有很多查詢方法,我想自定義一個Controller做個薄封裝,同時把Repository 的東西透傳。
因為客戶端全部用 HATEOAS 格式決議。
例子;
自定義擴展Controller
@RepositoryRestController
public get(引數。。。){
//擴展代碼。。。
Page<XXX> page = Repository .find(引數。。。)// 默認Repository層的方法呼叫
如何回傳完整的Spring HATEOAS 格式?與默認的sdr一致?
}
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/228633.html
標籤:Java EE
上一篇:請教一下wstring輸出的問題
下一篇:最近在使用openldap ,安裝啟動都是正常的,可是在用著用著自己就關閉了,實在找不到原因,還請走過路過的大神,支支招,日志貼圖在下面!
