Skip to content

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

Open
@spring-projects-issues

Description

@spring-projects-issues

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions