Commit Graph

739 Commits

Author SHA1 Message Date
Oliver Drotbohm
1ae7efd0b8 Properly handle associations in nested entities.
Nested entities that contain a reference to an aggregate root get a link to that attached to their representation. Previously, the creation of those links assumed that the reference is a materialized instance of the remote aggregate. That's now altered to be able to deal with associations, use identifiers directly or materialize to an intermediate aggregate instance to potentially use a custom lookup.
2021-04-07 17:22:12 +02:00
Mark Paluch
eb5d3c64ce Prepare next development iteration.
See #1988
2021-03-31 18:29:39 +02:00
Mark Paluch
3490bdda80 Release version 3.4.7 (2020.0.7).
See #1988
2021-03-31 18:19:53 +02:00
Mark Paluch
ab6a56a99f Prepare next development iteration.
See #1979
2021-03-17 11:02:14 +01:00
Mark Paluch
01a97618bb Release version 3.4.6 (2020.0.6).
See #1979
2021-03-17 10:54:13 +01:00
Oliver Drotbohm
21556e68c1 #1980 - RepositoryEntityLinks now overrides ….linkForItemResource(…). 2021-02-24 18:00:32 +01:00
Christoph Strobl
024d2a5c90 Prepare next development iteration.
See #1975
2021-02-18 11:12:45 +01:00
Christoph Strobl
2ef4d613d5 Release version 3.4.5 (2020.0.5).
See #1975
2021-02-18 10:59:16 +01:00
Christoph Strobl
4e330812b7 Prepare next development iteration.
See #1953
2021-02-17 13:41:53 +01:00
Christoph Strobl
f5992a4e4f Release version 3.4.4 (2020.0.4).
See #1953
2021-02-17 12:00:24 +01:00
Oliver Drotbohm
531ad91ad0 Avoid late registration of PathPatternParser on DelegatingHandlerMapping.
Instead of registering the PathPatternParser on DelegatingHandlerMapping via WebMvcConfigurer.configurePathMatch(…) we now consume the bean exposed in context of the fix for spring-projects/spring-framework#26427.

We also use the newly introduced RequestMappingInfo.mutate() to add our customizations of the produces clause for Spring Data REST's mappings.

Fixes GH-1965.
2021-01-26 23:00:36 +01:00
Oliver Drotbohm
8ed034568b GH-1926 - Avoid wrapping nested entities ultimately to represent a value.
NestedEntitySerializer now skips the wrapping into an EntityModel if the target serializer is a JsonValueSerializer as EntityModel requires the value to ultimately resolve into key value pairs as it's only enriching something that's rendered as JSON document with hypermedia elements.
2021-01-18 16:20:39 +01:00
Oliver Drotbohm
b9c02938d1 Let DelegatingHandlerMapping implement HandlerMapping directly.
We actually do not want to inherit all the functionality implemented in AbstractHandlerMapping. The sole reason we did so before was to override the method to propagate the PathPatternResolver to the downstream HandlerMappings. We now just declare the method on DHM directly.

Fixes GH-1955.
2021-01-14 15:37:44 +01:00
Oliver Drotbohm
72ff0c7ec5 DATAREST-1590 - Avoid need for eager access to components in RepositoryRestMvcConfiguration.
Switch to ObjectProvider for all component dependencies in the constructor of RepositoryRestMvcConfiguration. Made the bean definition of AnnotatedEventHandlerInvoker a static bean as it's an application listener and it being an instance method causes extend initialization of the configuration class trickling down into unnecessary bean lookups that early in the lifecycle.

Fixes GH-1921.
2021-01-14 14:37:07 +01:00
Christoph Strobl
b275144074 Prepare next development iteration.
See #1945
2021-01-13 15:01:49 +01:00
Christoph Strobl
9cbe1d82d0 Release version 3.4.3 (2020.0.3).
See #1945
2021-01-13 14:18:34 +01:00
Mark Paluch
59bd7692fa Update copyright year to 2021.
Closes #1952
2021-01-12 11:45:28 +01:00
Mark Paluch
30d539b8aa Upgrade to Servlet API 4.0.1.
We now build against a newer Servlet API version to align with Spring Framework.

Also, introduce a version property servlet.version for centralized version management.

Closes #1951
2021-01-11 08:58:37 +01:00
Mark Paluch
d306e07c18 DATAREST-1580 - Prepare next development iteration. 2020-12-09 16:46:49 +01:00
Mark Paluch
c2339c551c DATAREST-1580 - Release version 3.4.2 (2020.0.2). 2020-12-09 16:01:26 +01:00
Oliver Drotbohm
8e74091299 DATAREST-1581 - Fixed CORS defaults to include all HTTP methods exposed by Spring Data REST.
The fix for DATAREST-1535 has changed the default allowed methods for CORS requests to a smaller set than we originally returned. This commit reinstantiates the default to be set to all HTTP methods, Spring Data repositories support by default.

Related tickets: DATAREST-1535.
2020-12-01 22:50:56 +01:00
Mark Paluch
77263d1b95 DATAREST-1577 - Prepare next development iteration. 2020-11-11 12:14:51 +01:00
Mark Paluch
9342762c70 DATAREST-1577 - Release version 3.4.1 (2020.0.1). 2020-11-11 11:59:00 +01:00
Mark Paluch
fe16545cc7 DATAREST-1570 - Prepare next development iteration. 2020-10-28 16:10:51 +01:00
Mark Paluch
3a05cca9b6 DATAREST-1570 - Release version 3.4 GA (2020.0.0). 2020-10-28 15:46:57 +01:00
Oliver Drotbohm
f00451dc7e DATAREST-1213 - Polishing.
Simplified tests and domain code. Reinstantiated accidentally removed method in PersistentEntityResource.

Original pull request: #355.
2020-10-26 22:36:01 +01:00
Dario Seidl
055c4528e8 DATAREST-1213 - ETag creation now uses proxy target for projections.
Original pull request: #355.
2020-10-26 22:36:01 +01:00
Christoph Strobl
f301dcc0bc DATAREST-1562 - Prepare next development iteration. 2020-10-14 14:48:46 +02:00
Christoph Strobl
150ed4164e DATAREST-1562 - Release version 3.4 RC2 (2020.0.0). 2020-10-14 14:28:56 +02:00
Oliver Drotbohm
25cfb6ecb9 DATAREST-1567 - Polishing.
Tweaked test setups to work without the explicit component scanning.

Original pull request: #382.
2020-09-25 10:57:15 +02:00
Christoph Strobl
8ff438678d DATAREST-1567 - Replace component scan with explicit bean methods.
We replaced the component scan in RespositoryRestMvcConfiguration with dedicated bean methods. This allows us to be more explicit in resolving required components, which is required for better support of GraalVM native image.

Original pull request: #382.
2020-09-25 10:57:15 +02:00
Mark Paluch
0072676ab2 DATAREST-1554 - Prepare next development iteration. 2020-09-16 14:05:26 +02:00
Mark Paluch
8b2df69464 DATAREST-1554 - Release version 3.4 RC1 (2020.0.0). 2020-09-16 13:57:43 +02:00
Oliver Drotbohm
0392103371 DATAREST-1545 - Polishing. 2020-09-15 17:13:53 +02:00
Greg L. Turnquist
9737366174 DATAREST-1545 - Migrate away from proxy-based configuration. 2020-09-15 17:13:53 +02:00
Mark Paluch
5a57fafc2e DATAREST-1539 - Prepare next development iteration. 2020-08-12 12:00:21 +02:00
Mark Paluch
fe6192198a DATAREST-1539 - Release version 3.4 M2 (2020.0.0). 2020-08-12 11:52:06 +02:00
Oliver Drotbohm
bf401f7476 DATAREST-1553 - Removed deprecations introduced prior to 3.4.
Removed Java8PluginRegistry not in use anymore anyway. Same for RepositoryRestConfigurerAdapter. Deprecated legacy ResourceMappingUtils and its client code exposed in RepositoryRestConfiguration as it's also not considered anymore.
2020-08-11 17:44:36 +02:00
Oliver Drotbohm
b17fed5fa6 DATAREST-1523 - Delombok production sources.
Hacking.
2020-08-11 16:53:15 +02:00
Mark Paluch
c73a1c1576 DATAREST-1549 - Polishing.
Move off deprecated API.
2020-08-04 15:33:16 +02:00
Oliver Drotbohm
15b8d598bd DATAREST-1540 - Tweak HandlerMapping setup to retain compatibility with 5.3.
Turns out that Spring Boot references DelegatingHandlerMapping from its metrics integration to pick up the HandlerMappings delegated to. Reintroduced the relevant type in deprecated form and also let it implement Iterable<HandlerMapping> so that client code can be moved to generally check for HandlerMappings implementing that and pick up the delegates that way.
2020-07-29 12:27:31 +02:00
Oliver Drotbohm
9f62237dd3 DATAREST-1543 - Deprecate RepositoryRestConfiguration.getCorsRegistry().
Slightly tweaked the configuration model to rather handle the CorsRegistry via RepositoryRestConfigurer.configureRepositoryRestConfiguration(…) rather than RepositoryRestConfiguration itself. That allows moving of Spring WebMVC as a dependency in the core module.

The original methods exposing access to the CorsRegistry are now still available in deprecated form to not break existing clients.

Follow-up ticket: DATAREST-1542.
2020-07-03 15:06:41 +02:00
Oliver Drotbohm
d7f36b1180 DATAREST-1540 - Improvements in HandlerMapping implementation for Spring 5.3.
We now use Spring's path prefix capabilities to apply Spring Data REST's base path to its mappings. This was previously implemented by tweaking the matching conditions.

We now also pick up Spring 5.3's PathPatternParser and apply that to the custom HandlerMapping implementations we register.

Moved DelegatingHandlerMapping into the configuration package to be able to keep it around in package scope.

Deprecated RepositoryRestConfiguration.getBaseUri() as we have only supported paths for quite a while now. Moved all client code to ….getBasePath() instead.
2020-07-01 18:55:11 +02:00
Mark Paluch
1f28937389 DATAREST-1522 - Prepare next development iteration. 2020-06-25 11:58:20 +02:00
Mark Paluch
05c43601ca DATAREST-1522 - Release version 3.4 M1 (2020.0.0). 2020-06-25 11:48:51 +02:00
Oliver Drotbohm
a9576991fe DATAREST-1535 - Adapt to changes in Spring Framework 5.3.
We now implement getPatternParser() in DelegatingHandlerMapping introduced in Spring 5.3. Adapt to changes in CORS handling.
2020-06-24 23:52:45 +02:00
Mark Paluch
5368d5d5c8 DATAREST-1516 - Prepare next development iteration. 2020-05-12 12:40:28 +02:00
Mark Paluch
a9592c98f5 DATAREST-1516 - Release version 3.3 GA (Neumann). 2020-05-12 12:28:23 +02:00
Mark Paluch
9835b36c0a DATAREST-1501 - Prepare next development iteration. 2020-04-28 15:11:42 +02:00
Mark Paluch
7c20c0daa0 DATAREST-1501 - Release version 3.3 RC2 (Neumann). 2020-04-28 15:03:53 +02:00