Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New RepositoryRestResource Annotaion for Entity Class [DATAREST-1255] #1618

spring-projects-issues opened this issue Jun 13, 2018 · 1 comment
in: repository status: declined type: enhancement


Copy link

@spring-projects-issues spring-projects-issues commented Jun 13, 2018

Michael Reed opened DATAREST-1255 and commented

A new annotation for a model/entity/data class which cuts down on boilerplate. 

Currently if you are creating a quick simple @RepositoryRestResource interface and you for go defining any specific signatures, you end up with a lot of empty interfaces with repeated code.

To cut down on the boilerplate for such instances it would be nice to just add the @RepositoryRestResource(or a new annotation) to the actual model/entity/data class. This annotation would effectively be generating the same code the current @RepositoryRestResource is generating today, but without the need for nearly empty interfaces. 

It may require an additional parameter for the type of repository that you are looking to create as well. ex. PagingAndSortingRepository vs. any other repository.



No further details from DATAREST-1255

Copy link

@spring-projects-issues spring-projects-issues commented Jun 13, 2018

Oliver Drotbohm commented

I don't think we want to go down that route. I strongly disagree that you're dealing with empty interfaces. Repository are a key element of your domain model and in any real world application contain way more than just CRUD operations. It's query methods, custom implementations etc. I.e. what you ask for is over-optimization for a hello world scenario that only applicable to the simplest demo cases

@spring-projects-issues spring-projects-issues added status: declined in: repository type: enhancement labels Dec 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
in: repository status: declined type: enhancement
None yet

No branches or pull requests

2 participants