283 Commits

Author SHA1 Message Date
Spring Buildmaster
24418b20a4 DATAREST-601 - Prepare next development iteration. 2015-06-30 23:43:14 -07:00
Spring Buildmaster
c9cb4a9b74 DATAREST-601 - Release version 2.1.6.RELEASE (Dijkstra SR6). 2015-06-30 23:43:12 -07:00
Spring Buildmaster
3e18809961 DATAREST-458 - Prepare next development iteration. 2015-01-27 09:24:26 -08:00
Spring Buildmaster
ccc94dccd2 DATAREST-458 - Release version 2.1.5.RELEASE (Dijkstra SR5). 2015-01-27 09:24:09 -08:00
Oliver Gierke
34ecc058c2 DATAREST-460 - Polished RepositoryRestMvcConfiguration to fix CGLib proxying.
Made private methods that call @Bean methods protected so that they can become subject to CGLib proxying. Inlined getDefaultedRelProvider().
2015-01-20 10:43:28 +01:00
Neeme Praks
c74a2022cd DATAREST-457 - Fixed typo in JavaDoc of BaseUri.
Original pull request: #159.
2015-01-20 08:00:25 +01:00
Spring Buildmaster
e523f2dcf0 DATAREST-378 - Prepare next development iteration. 2014-08-27 03:35:07 -07:00
Spring Buildmaster
2d65e81f6a DATAREST-378 - Release version 2.1.4.RELEASE (Dijkstra SR4). 2014-08-27 03:35:05 -07:00
Spring Buildmaster
16031df155 DATAREST-361 - Prepare next development iteration. 2014-07-28 03:12:28 -07:00
Spring Buildmaster
deaf35511c DATAREST-361 - Release version 2.1.2.RELEASE (Dijkstra SR2). 2014-07-28 03:12:25 -07:00
Oliver Gierke
c595ce63e5 DATAREST-343 - Fixed dependency to jackson-annotations after 2.3.4 upgrade.
See: https://github.com/FasterXML/jackson-annotations/issues/39
2014-07-28 12:05:13 +02:00
Oliver Gierke
bba78849bd DATAREST-326 - Improved configuration setup for better Boot compatibility.
We now don't expose the PersistentEntityJackson2Module as bean anymore to prevent global registration in case of a Boot setup. The HttpMessageConverters registered are now TypeConstrainedMappingJackson2HttpMessageConverters so that they only get used of the object to marshal is of type ResourceSupport.
2014-07-25 21:27:35 +02:00
Oliver Gierke
cb5f04083f DATAREST-353 - Fixed potential NullPointerException when trying to delete a non-existing resource.
We now correctly return a 404 Not Found in case we receive a DELETE request for a resource not existing.
2014-07-16 17:46:51 +02:00
Oliver Gierke
5182808605 DATAREST-337 - Fix trailing whitespace in poms. 2014-07-08 14:05:52 +02:00
Oliver Gierke
15b47b1f03 DATAREST-343 - Added jackson-annotation as explicit dependency.
Added explicit dependency to jackson-annotations as a library previously declared might pull in that one in a different version which might cause conflicts.
2014-07-02 09:24:38 +02:00
Spring Buildmaster
350fcd8a76 DATAREST-337 - Prepare next development iteration. 2014-06-30 07:42:04 -07:00
Spring Buildmaster
e57ddb1695 DATAREST-337 - Release version 2.1.1.RELEASE (Dijkstra SR1). 2014-06-30 07:42:01 -07:00
Oliver Gierke
76388d7074 DATAREST-340 - AssociationOmittingSerializerModifier now keeps non-persistent property writers.
AssociationOmittingSerializerModifier previously dropped the writer fro a particular property if it couldn't find a PersistentProperty for the bean property. We now keep those writers to make sure that non-persistent, additional fields are written as well.

Related issues: https://github.com/spring-projects/spring-boot/issues/1190
2014-06-30 13:23:50 +02:00
Oliver Gierke
8971e9d3a3 DATAREST-328, DATAREST-320 - AssociationOmittingSerializerModifier now correctly considers renamed properties.
Previously, if a persistent property was renamed using e.g. @JsonProperty, the lookup of the PersistentProperty failed as BeanPropertyWriter exposes the final (renamed) property name, not the internal one. We now defensively lookup the correct BeanPropertyDescriptor using the external name and use the corresponding internal one for the PersistentProperty lookup.
2014-06-27 18:43:56 +02:00
Oliver Gierke
6d6f32a9b3 DATAREST-331 - Fixed NullPointerException in ResourcesProcessorWrapper.
During type matching in ResourcesProcessorWrapper we now accomodate the scenario that a Resources type is completely different than the Resources type to look for. This resulted in null being returned for the supertype generics lookup and this failed as the corresponding guard was missing.
2014-06-26 11:25:50 +02:00
Oliver Gierke
2401f98d93 DATAREST-182 - Removed obsolete wirings from AbstractRepositoryRestController.
Removed the wirings for PlatformTransactionManager and ValidationExceptionHandler from AbstractRepositoryRestController. Removed the latter entirely as it doesn't seem to be used anywhere anyway.
2014-06-24 23:38:27 +02:00
Oliver Gierke
479858278f DATAREST-331 - Fixed invocation of processors for Resources subtypes in ResourceProcessorHandlerMethodReturnValueHandler.
ResourceProcessorHandlerMethodReturnValueHandler now also invokes ResourceProcessors that are typed to Resources even if the value returned by the controller is a sub-type of it.

Also added test cases for the invocation of processors for projections.
2014-06-24 19:36:55 +02:00
Oliver Gierke
182dab6d51 DATAREST-330 - Exposed resources now support HEAD requests where reasonable.
The collection and item resources as well as the search and query method resources now answer HEAD requests according to the repository definition.
2014-06-24 18:35:01 +02:00
Oliver Gierke
65155f5e1e DATAREST-329 - Improved RepositoryRestMvcConfiguration to not eagerly initialize beans.
The bean definition for annotatedHandlerBeanPostProcessor now is a static one so that it doesn't require the config class to be instantiated and populated, which caused the (too) eager initialization of all dependent beans.

Also we now leniently lookup all ResourceProcessor instances available in the context to prevent the lookup during config class preparation.

Ignore Neo4j tests now as they run into OutOfMemoryErrors.
2014-06-24 15:40:39 +02:00
Oliver Gierke
7281bcdca4 DATAREST-318 - BaseUri now correctly strips template variables from request.
Bugfix in BaseUri to correctly strip template variables when the repository lookup path is obtained from a NativeWebRequest.
2014-06-12 12:45:39 +02:00
Oliver Gierke
c71618b690 DATAREST-316 - UriStringDeserializer now guards against UriTemplate.
We now defensively guard against URI templates submitted for related resources and expand the incoming URI string source to avoid URI.create(…) to fail.

Also, RepositoryPropertyReferenceController.loadPropertyValue(…) now also uses UriTemplate to guard against Uri templates provided for property references.
2014-06-12 12:44:18 +02:00
Rodrigue Bouleau
dde340bf92 DATAREST-311 - Fixed execution of query methods for compact media type.
Fixed the request parameter binding of RepositorySearchController. executeSearchCompact(…). Changed returned value to Resources to be able to use the EMPTY_RESOURCES_LIST constant to indicate no actual results.

Original pull request: #139.
2014-06-02 12:04:19 +02:00
Oliver Gierke
e8fd0c60ff DATAREST-306 - Prepare next development iteration. 2014-05-22 12:40:20 +02:00
Spring Buildmaster
c67f79d5ae DATAREST-306 - Release version 2.1.0.RELEASE. 2014-05-20 20:04:39 +02:00
Oliver Gierke
5c507edb52 DATAREST-307 - Fixed handling of root resource on Tomcat.
We're now using a single slash to make sure the downstream method mapping works as expected.
2014-05-20 13:39:21 +02:00
Oliver Gierke
ca3b3bb354 DATAREST-301 - Fixed location header creation for self links containing URI templates.
We now consistently expand the self links created before adding them as location header to make sure we can create a URI instance successfully.
2014-05-06 12:10:55 +02:00
Oliver Gierke
fe3c10bead DATAREST-300 - BaseUri now removes URI template variables from lookup path.
BaseUri now strips away the tail of a lookup path starting with {. An unencoded { must never appear in a URI but could accidentally be sent by a client forgetting to expand URI templates we return.
2014-05-05 14:26:17 +02:00
Spring Buildmaster
cafa6f7931 DATAREST-297 - Prepare next development iteration. 2014-05-02 06:15:33 -07:00
Spring Buildmaster
5693af6f2a DATAREST-297 - Release version 2.1.0.RC1. 2014-05-02 06:15:31 -07:00
Oliver Gierke
b458378bbc DATAREST-276 - Yet another round of trailing slash handling.
We need to proactively strip trailing slashes during base URI handling as even on a successful match (which previously left trailing slashes intact) this might subsequently on the resolving of the repository metadata when evaluating the left-over lookup path against the @RequestMapping methods (which keeps trailing slashes).
2014-05-02 11:19:44 +02:00
Oliver Gierke
b2927eb5a0 DATAREST-276 - Improved BaseUri to accomodate trailing slashes.
We now strip trailing and leading slashes from configured base URI to make sure the matching algorithm accommodates both lookup paths with and without trailing slashes.

Added a few more tests in shape of unit tests for BaseUri.
2014-05-01 14:47:42 +02:00
Oliver Gierke
addaea62ef DATAREST-276 - Improve base URI handling.
Introduced BaseUri value object being able to extract the lookup path within the Spring Data REST URI namespace from requests and plain lookup paths. This encapsulates the logic we previously had in RepositoryRestHandlerMapping but it is needed in the HandlerMethodArgumentResolver implementations as well to make sure they extract RepositoryMetadata correctly.
2014-04-30 15:01:07 +02:00
Oliver Gierke
e5dbc30d8a DATAREST-276 - Fixed ArrayIndexOutOfBoundsException in RepositoryRestHandlerMapping.
We now make sure the RepositoryRestHandlerMapping correctly refrains from handling the request in case the URI doesn't match the configured base URI.
2014-04-30 13:36:54 +02:00
Oliver Gierke
b844b95a27 DATAREST-276 - RepositoryRestHandlerMapping now works with absolute base URIs.
Refined the algorithm to detect the lookup path within the configured base URI, even if the base URI was defined in an absolute way. Also, solidified the implementation against URIs with trailing slashes.
2014-04-29 16:44:49 +02:00
Oliver Gierke
7dfdaa5114 DATAREST-294 - RepositoryRestConfiguration has more fine grained control over media type defaults.
RepositorRestConfiguration now has a ….useHalAsDefaultJsonMediaType() which defaults to true. Configuring this to false allows to still use HAL as default media type in case no Accept header is set or it is set to */*. The flag decides what to return when an Accept header is set to application/json.
2014-04-29 10:09:15 +02:00
Oliver Gierke
b69b715a66 DATAREST-292, DATAREST-296 - RepositoryLinkBuilder now honors absolute base URIs.
In case a base URI is an absolute one, we now rely on only the base URI as foundation for all links created. Relative base URIs are considered are considered an amendment to the current server base up until the servlet mapping. The latter allows to create a dedicated URI namespace for Spring Data REST exposed resources.
2014-04-29 09:54:17 +02:00
Oliver Gierke
45ef259826 DATAREST-292 - Fixed application of configured base URI.
Major overhaul of mapping detection in RepositoryRestHandlerMapping. We now correctly map URIs if a base URI is configured via RepositoryRestConfiguration.
2014-04-23 17:56:28 +02:00
Oliver Gierke
9f1a08d412 DATAREST-288 - Removed javax.validation dependency from schema controller. 2014-04-10 09:23:41 +02:00
Spring Buildmaster
d0ccd7251d DATAREST-257 - Prepare next development iteration. 2014-03-31 08:33:17 -07:00
Spring Buildmaster
b5b5b94f01 DATAREST-257 - Release version 2.1.0.M1. 2014-03-31 08:33:14 -07:00
Oliver Gierke
fc4eb30aa1 DATAREST-279 - Fixed creation of point instances from longitude and latitude. 2014-03-25 10:36:56 +01:00
Oliver Gierke
162bba05d5 DATAREST-280 - Improvements in RepositoryRestConfiguration.
Removed custom subclass to use @EnableHypermediaSupport as this was effectively a workaround for SPR-11251, fixed in Spring 3.2.7.

Move away from autowiring all MappingContexts into the configuration as this will require the instances to be created when the configuration class is prepared. We now rather inspect the BeanFactory on access of persistentEntities().
2014-03-21 18:17:52 +01:00
Oliver Gierke
174d3d0e8c DATAREST-279 - Marshalling support for new geo types.
Added StringTo(Distance|Point)Converter implementations to be able to submit Distances and Points via URIs. See the JavaDoc of those classes for more details.

RepositoryRestMvcConfiguration now also registers the GeoModule provided by Spring Data Commons with the ObjectMapper registered for our custom HttpMessageConverters.
2014-03-21 18:12:03 +01:00
Oliver Gierke
6dd353f9c9 DATAREST-258 - Mitigate changes in Spring Data Neo4j 3.0.1.
We now explicitly set a base backage in the Neo4jConfiguration to make sure, the domain classes get added to the MappingContext upfront. Filed DATAGRAPH-448 [0] for some reasonable defaulting going forward.

[0] https://jira.spring.io/browse/DATAGRAPH-448
2014-03-21 14:35:58 +01:00
Oliver Gierke
05fa30abc1 DATAREST-277 - Adapted to changed generics in BeanWrapper. 2014-03-21 11:39:31 +01:00