spring-projects / spring-projects/spring-data-commons

Introduce separate Spring Data Commons API project for Pageable, Page, and other interfaces [DATACMNS-1054]

Open
#1,500 7 comments 0 reactions 1 assignee View on GitHub

@odrotbohm is already working on this.

Since Dec 30, 2020.

status: feedback-provided type: dependency-upgrade
Dominant language
Java
Stars
838
Forks
730
PR merge metrics
No merged PRs in 30d

Description

Benjamin Schmeling opened DATACMNS-1054 and commented

When using Spring Data, the Pageable and Page interfaces are often part of a project's public API. If you extract your API into a separate project in order to decouple it from the underlying implementation, you will introduce a dependency to Spring Data Commons (that's okay since it contains the aforementioned interfaces) but also to its transitive dependencies Spring Core and Spring Beans.

If you use Page and Pageable in your API project and want to avoid introducing dependencies to Spring Core and Spring Beans you would have to redefine the interfaces and transform them back and forth to Spring interfaces in order to leverage Spring Data's paging and sorting features.

Currently, if you want to use Page and Pageable in your API and want to avoid introducing dependencies to Spring Core and Spring Beans you would have to redefine the interfaces and transform the back and forth to Spring interfaces in order to leverage Spring Data's paging and sorting features.

That said, I would propose to introduce something like an additional Spring Data Commons Api project to which you could move all technology neutral interfaces of Spring Data (maybe there are other potential candidates). To move the Page interface into a future Spring Data Commons Api the dependency to org.springframework.core.convert.converter.Converter would have to be removed.


No further details from DATACMNS-1054

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.