Due to the change in the default media type, the RepositorySearchController was totally broken as it used "produces" clauses in the request mapping. I've removed them and added test cases to make sure the search resources are exposed and are accessible.
Altered the order of HttpMessageConvertersRegistered based on the default media type being defined. This causes the legacy representation to be rendered as default representation if the default media type on RepositoryRestConfiguration is set to something different from HAL.
We're now using @EnableHypermediaSupport via a delegated class to prevent @EnableHypermediaSupport from breaking when RepositoryRestMvcConfiguration is subclassed.
The build script now declares the Jackson Hibernate 4 as optional dependency to avoid being registered in a non-Hibernate environment. Tightened auto-registration checks to also check for Hibernate 4 presence at all.
We automatically activate verbose date rendering when registering the Joda Time module.
This commit introduces support for HAL rendering and making it the default rendering option. The configuration now registers an additional MappingJackson2HttpMessageConverter with the according HAL modules registered and makes this the default JSON renderer if the default media type is configured to HAL (which it is by default). To change this, set RepositoryRestConfiguration.setDefaultMediaType(…) back to application/json.
Refactored the PersistentEntityJackson2Module to turn the PersistentEntityResource into it's correct shape (turning associations into links) and the delegate to the default rendering, so that the HAL customizations provided by Spring HATEOAS can kick in. Adapted test cases to the change in default representation format.
Upgraded to Jackson 2.3.0, Spring 3.2.6 and Spring HATEOAS 0.9.0.BUILD-SNAPSHOT. Upgraded to Gradle 1.10.
The BeanWrapper used to set and get values of entities now gets a autowired ConversionService applied. Simplified collection and map creation by using Spring API. Added test case to update an entity with an embedded collection.
Removed the attempt to add a link to the response for non-associations. Switched to the usage of Simple(Property|Association)Handlers for simplified generics.
Made RepositoryInvokerFactory an interface and renamed the previously existing implementation class to DefaultRepositoryInvokerFactory. Removed instantiation of the class from ResourceMetadataHandlerMethodArgumentResolver to keep the logic which implementation to use solely in the configuration.
Set order of RepositoryRestHandlerMapping to LOWEST_PRECEDENCE - 100 to give core Spring Framework components the chance to hook into the right place in the chain.
Refactored RepositoryRestHandlerMapping to really check for the exposed path and added test cases for handler method resolution.
PersistentEntityJackson2Module now entirely relies on the property mapping to do the right thing for link creation. The PropertyResourceMapping now returns the property name for both rel and path.
Use constructor injection consistently now in ResourceProcessorInvokingHandlerAdapter and RepositoryRestHandlerAdapter. Removed unnecessary constructor in ResourceProcessorInvokingHandlerAdapter.
Renamed RestController annotation to RepositoryRestController to avoid confusion with Spring 4's @RestController.
Fix ResourceProcessorInvokingHandlerAdapter to call
getReturnValueHandlers() via reflection and deal with different
response types.
This change is necessary due to SPR-10519 which changed the API of
RequestMappingHandlerAdapter.getReturnValueHandlers() to return a
List rather than a HandlerMethodReturnValueHandlerComposite.
Original pull request: #114.
Merged core and repository modules into core. Renamed some packages for consistency in naming and in preparation to break up some package cycles. Removed @BaseUri and the according resolver. Refactored controllers a bit to have more reusable chunks of code.
The exporter can now work with repositories that do not implement CrudRepository. Introduced a new RepositoryInvoker abstraction that transparently exposes which CRUD methods the repository offers.
We still offer special invokers that can be used for CrudRepository and PagingaAndSortingRepository implementations to avoid the reflection overhead the general mechanism introduces.
Removed the need for RepositoryInformationSupport. Refactored Converter implementations to get dependencies injected directly and use constructor injection.
Added new RepositoryInvoker abstraction to avoid reflection for known CrudRepository or PagingAndSortingRepository. Refactored existing RepositoryMethodInvoker to implement the new abstraction.
Refactored AbstractRepositoryRestController and RepositoryEntityContoller to use new mapping API.
Use configuration hook to force all Spring Framework dependencies into a particular version. Disabled caching for dynamic versions to hopefully let Gradle pick up snapshot dependencies finally.