1
デフォルトでは、Spring Data RESTは検索リソースを{resource_name}/search
のURLに公開します。たとえば、次のコードのfindBySubject_Id
は{baseUrl}/questions/search/findBySubject_Id?subjectId={subjectId}
に公開されます。SpringデータのREST公開リンクの変更
public interface QuestionRepository extends PagingAndSortingRepository<Question, String> {
Page<Question> findBySubject_Id(@Param("subjectId")String subjectId, Pageable pageable);
}
互換性の理由から、露出リンクは{baseUrl}/questions?subjectId={subjectId}
である必要があります。それを行う方法はありますか?