You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem here is that in a modular environment the @relation annotation is a "detail" that the domain layer should not know about.
It would seem that it would be cleaner to put the @relation annotation on the same class that the @ExposesResourceFor is on, i.e. the controller.
I modified the AnnotationRelProvider to look first on the controller and only if it isn't found, to then look on the entity.
We could create our own class to do this, but it seems like this change would be useful to other people. It could also be in a new class, possibly ControllerAnnotationRelProvider" if there is concern that the AnnotationRelProvider should not know about controllers.
I've created a pull request for this change.
The text was updated successfully, but these errors were encountered:
jstano
pushed a commit
to jstano/spring-hateoas
that referenced
this issue
Aug 26, 2014
The problem here is that in a modular environment the @relation annotation is a "detail" that the domain layer should not know about.
It would seem that it would be cleaner to put the @relation annotation on the same class that the @ExposesResourceFor is on, i.e. the controller.
I modified the AnnotationRelProvider to look first on the controller and only if it isn't found, to then look on the entity.
We could create our own class to do this, but it seems like this change would be useful to other people. It could also be in a new class, possibly ControllerAnnotationRelProvider" if there is concern that the AnnotationRelProvider should not know about controllers.
I've created a pull request for this change.
The text was updated successfully, but these errors were encountered: