spring-projects / spring-hateoas

Spring HATEOAS - Library to support implementing representations for hyper-text driven REST web services.
https://spring.io/projects/spring-hateoas
Apache License 2.0
1.04k stars 476 forks source link

Migrate ResourceProcessorInvokingHandlerAdapter from spring-data-rest to spring-hateoas #109

Open sirianni opened 11 years ago

sirianni commented 11 years ago

We would like to use the ResourceProcessor mechanism in a project that does not use spring-data-rest (and without pulling in spring-data-rest and all of its dependencies). It seems like ResourceProcessorInvokingHandlerAdapter is not coupled to spring-data and would be better in this project (the javadoc comment seems to agree).

Can this be moved?

odrotbohm commented 10 years ago

Unfortunately, it is. ResourceProcessorInvokingHandlerAdapter uses Spring Data Core's TypeInformation abstraction to deal with generic types. It cannot be moved into Spring HATEOAS as this would create a cyclic dependency between Spring Data Core and Spring HATEOAS.

Spring 4 ships with a similar API (ResolvableType) which we can probably settle on once we upgrade to it. However, it's unlikely this will happen before mid 2014, so for the time being I recommend to simply include SD REST as library or include the class in your own codebase as it essentially only depends on Spring Data Core, Spring HATEOAS and Spring Web MVC.