spring-hateoas
spring-hateoas copied to clipboard
#232: modified the AnnotationRelProvider so it can look on the controlle...
...r for the @Relation annotation in addition to the entity
Any chance you clearly describe the use case you'd like to see this change fix? Generally speaking, simple code changes without test cases are not gonna cut it anyway.
I don't feel that putting spring-hateoas annotations on the entities, i.e. a backend class, is a good thing to do, since it couples the entity to the spring-hateoas library. By allowing the annotation to be put on the Controller, this keeps the application services layer clean and not dependent on the rest endpoint layer.
Good point. Should we rather tweak ControllerRelProvider to consider @Relation, too, then?
Yes, that is what we did in our forked branch.
Would you mind updating the pull request accordingly?
Will do.
@jstano Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.