765 Commits

Author SHA1 Message Date
Jens Schauder
cc073c5aea Prepare next development iteration.
See #2078
2021-11-12 09:51:37 +01:00
Jens Schauder
ab3100aea5 Release version 3.4.15 (2020.0.15).
See #2078
2021-11-12 09:37:00 +01:00
Oliver Drotbohm
ad3a1d0659 Consider @CrossOrigin(originPatterns = …).
RepositoryRestHandlerMapping's RepositoryCorsConfigurationAccessor now also evaluates @CrossOrigin's originPatterns into the CorsConfiguration.

Fixes #2077.
2021-10-19 10:32:53 +02:00
Mark Paluch
d0fca9945b Prepare next development iteration.
See #2064
2021-10-18 11:02:36 +02:00
Mark Paluch
8e540fcb38 Release version 3.4.14 (2020.0.14).
See #2064
2021-10-18 10:53:53 +02:00
Patrik Mihalcin
39528cfcb5 Fix typo in RepositoryRestController's JavaDoc
Fixes #2061.
2021-10-13 16:02:34 +02:00
Oliver Drotbohm
a66650a3af Prevent using NestedEntitySerializer if target serializer does not support unwrapping.
We now verify that the serializer registered for the type that's supposed to be handled by the NestedEntitySerializer actually supports unwrapping as the serialization in EntityModel (MapSuppressingUnwrappingSerializer) requires that to work properly.

Fixes #2056.
2021-10-13 12:09:45 +02:00
Oliver Drotbohm
7142e8441f Switch to JUnit 5.
Issue #2075.
2021-10-12 22:42:01 +02:00
Oliver Drotbohm
1acab9d48f Prevent duplicate controller registrations through class-level @RequestMapping.
When we detected @BasePathAwareController and @RepositoryRestController instances, we now reject types that use @RequestMapping on the class level as doing so causes an inevitable registration of the controller with Spring MVC.

Fixes #1342, #1628, #1686, #1946.
2021-10-06 12:37:51 +02:00
Oliver Drotbohm
af6a2c3a07 Polish Javadoc to prepare builds with JDK 17.
Issue #2068.
2021-09-21 15:29:17 +02:00
Mark Paluch
438dd84576 Prepare next development iteration.
See #2050
2021-09-17 09:04:17 +02:00
Mark Paluch
86c15e6306 Release version 3.4.13 (2020.0.13).
See #2050
2021-09-17 08:53:40 +02:00
Oliver Drotbohm
c1a2ae1610 Avoid eager reference to BackendIdConverter beans.
Switched to bean method parameter reference to all BackendIdConverter instances.

Fixes #2055.
2021-08-19 23:22:08 +02:00
Jens Schauder
84b194d773 Prepare next development iteration.
See #2044
2021-08-12 10:36:56 +02:00
Jens Schauder
432b9ea346 Release version 3.4.12 (2020.0.12).
See #2044
2021-08-12 10:25:55 +02:00
Jens Schauder
f1fee8132c Prepare next development iteration.
See #2030
2021-07-16 10:45:17 +02:00
Jens Schauder
910eeb8686 Release version 3.4.11 (2020.0.11).
See #2030
2021-07-16 10:19:53 +02:00
Mark Paluch
11291140c0 Prepare next development iteration.
See #2011
2021-06-22 15:28:49 +02:00
Mark Paluch
6baa500aa5 Release version 3.4.10 (2020.0.10).
See #2011
2021-06-22 15:18:24 +02:00
Oliver Drotbohm
4a13da2bc3 Avoid using Guava's Charset.
Replaced with Java's StandardCharset. Fixes #2026.
2021-06-17 21:16:27 +02:00
Greg L. Turnquist
8cf3284460 Drop explicit dependency on JSON Path.
Let Spring HATEOAS bring in this dependency.

See #2018.
2021-06-03 12:16:40 -05:00
Mark Paluch
56fba2250a Prepare next development iteration.
See #1998
2021-05-14 12:05:18 +02:00
Mark Paluch
3f0c49785d Release version 3.4.9 (2020.0.9).
See #1998
2021-05-14 11:52:25 +02:00
Oliver Drotbohm
a7df70ca46 DelegatingHandlerMapping now fully implements MatchingHandlerMapping correctly.
We now also implement MatchableHandlerMapping.getPatternParser() to expose the PathPatternParser we use. This is needed to detect that DelegatingHandlerMapping uses a PathPatternParser from the outside as the Spring MVC request processing pipeline treats those HandlerMappings in a special way. This is especially important in the context of spring-projects/spring-framework#26814 as that makes the HM implementations work properly in CORS preflight requests.

When used with Spring Security in place, CORS preflight requests are inspected through the HandlerMappingIntrospector, that looks up the CORS configuration for the handler to serve the actual request. That lookup previously failed as Spring MVC was unable to detect that Spring Data REST's DelegatingHandlerMapping works with a PathPatternParser and didn't properly set up the processing pipeline to eventually end up in an invalid state, produce an exception that caused the handler method lookup to fail and cause Spring Security to fail with a 403, claiming the request was invalid.

Fixes #2007.
2021-05-07 22:13:18 +02:00
Mark Paluch
f68f2f79a9 Prepare next development iteration.
See #1993
2021-04-14 11:42:06 +02:00
Mark Paluch
fe9c2f4789 Release version 3.4.8 (2020.0.8).
See #1993
2021-04-14 11:33:27 +02:00
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