Commit Graph

1503 Commits

Author SHA1 Message Date
Oliver Drotbohm
31b6d2bd9a Fix PUT merge handling for polymorphic properties.
We now replace the original value of polymorphic properties with the newly deserialized one if the type of the new one is different from the old one. We still copy all JSON ignored properties to the new instance to make sure that non-exposed, server-side state is retained. We apply the same handling for explicitly immutable source and/or target types.

Fixes #2130.
2022-04-04 15:37:25 +02:00
Oliver Drotbohm
4fe765c46f Fix potential NullPointerException in HalFormsAdaptingResponseBodyAdvice.
Fixes #2123.
2022-03-28 17:03:47 +02:00
Mark Paluch
66ec8b4c22 After release cleanups.
See #2110
2022-03-21 14:34:35 +01:00
Mark Paluch
2ad492cbef Prepare next development iteration.
See #2110
2022-03-21 14:34:33 +01:00
Mark Paluch
c8fd127ba1 Release version 3.5.10 (2021.0.10).
See #2110
2022-03-21 14:26:38 +01:00
Mark Paluch
dbc3fd71ba Prepare 3.5.10 (2021.0.10).
See #2110
2022-03-21 14:26:10 +01:00
Mark Paluch
68e17ed4e3 Use Java 8 to build snapshots for Artifactory.
Closes #2113
2022-03-15 14:49:09 +01:00
Mark Paluch
f17707a869 Update CI properties.
See #2110
2022-02-22 14:08:49 +01:00
Mark Paluch
358c58c1f5 Upgrade to Maven Wrapper 3.8.4.
See #2115
2022-02-22 13:55:10 +01:00
Oliver Drotbohm
9bbe4c97eb Ensure buildability on JDK 16.
Properly initialize the MongoMappingContext in unit tests when using special identifier types. Explicitly add javax.annotation as dependency in shop tests.
2022-02-22 10:51:07 +01:00
Mark Paluch
b121f93cbb Use Java 17 to build snapshots for Artifactory.
Closes #2113
2022-02-22 10:30:11 +01:00
Mark Paluch
233826f2b7 Update CI properties.
See #2110
2022-02-21 14:51:45 +01:00
Mark Paluch
2ca7e4be62 After release cleanups.
See #2097
2022-02-18 10:32:53 +01:00
Mark Paluch
8d28426c97 Prepare next development iteration.
See #2097
2022-02-18 10:32:51 +01:00
Mark Paluch
5652bc1207 Release version 3.5.9 (2021.0.9).
See #2097
2022-02-18 10:24:49 +01:00
Mark Paluch
22c8148704 Prepare 3.5.9 (2021.0.9).
See #2097
2022-02-18 10:24:15 +01:00
Greg L. Turnquist
be73f0fa7b Update CI properties.
See #2097
2022-02-14 14:38:47 -06:00
Oliver Drotbohm
0b08548065 Update copyright years to 2022. 2022-02-07 10:30:48 +01:00
Mark Paluch
2bf268f14f Externalize build properties.
Closes #2103.
2022-02-07 09:20:24 +01:00
Christoph Strobl
4eac352761 After release cleanups.
See #2085
2022-01-14 10:00:58 +01:00
Christoph Strobl
c48d389ddd Prepare next development iteration.
See #2085
2022-01-14 10:00:55 +01:00
Christoph Strobl
33045214b5 Release version 3.5.8 (2021.0.8).
See #2085
2022-01-14 09:47:49 +01:00
Christoph Strobl
15044ff842 Prepare 3.5.8 (2021.0.8).
See #2085
2022-01-14 09:47:09 +01:00
Jens Schauder
3b1f139617 After release cleanups.
See #2079
2021-11-12 10:38:58 +01:00
Jens Schauder
321b701dbd Prepare next development iteration.
See #2079
2021-11-12 10:38:55 +01:00
Jens Schauder
efbf982f5b Release version 3.5.7 (2021.0.7).
See #2079
2021-11-12 10:27:21 +01:00
Jens Schauder
c7835bc679 Prepare 3.5.7 (2021.0.7).
See #2079
2021-11-12 10:26:44 +01:00
Oliver Drotbohm
6a6c173503 Consider @CrossOrigin(originPatterns = …).
RepositoryRestHandlerMapping's RepositoryCorsConfigurationAccessor now also evaluates @CrossOrigin's originPatterns into the CorsConfiguration.

Fixes #2077.
2021-10-19 10:33:00 +02:00
Mark Paluch
7f0b6d415c After release cleanups.
See #2065
2021-10-18 11:19:45 +02:00
Mark Paluch
c9ad97dbe6 Prepare next development iteration.
See #2065
2021-10-18 11:19:42 +02:00
Mark Paluch
67b64d2391 Release version 3.5.6 (2021.0.6).
See #2065
2021-10-18 11:11:46 +02:00
Mark Paluch
857a151411 Prepare 3.5.6 (2021.0.6).
See #2065
2021-10-18 11:10:49 +02:00
Patrik Mihalcin
25bd6d4ba5 Fix typo in RepositoryRestController's JavaDoc
Fixes #2061.
2021-10-13 16:02:25 +02:00
Oliver Drotbohm
b7fd4fb73b 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 11:56:43 +02:00
Oliver Drotbohm
5f4e24b912 Switch to JUnit 5.
Issue #2075.
2021-10-12 22:34:01 +02:00
Oliver Drotbohm
3d03b0cbe6 Reduce general runtime exception logging to debug.
Issue #2074.
2021-10-12 16:21:22 +02:00
Oliver Drotbohm
a6de3b18c4 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:35:41 +02:00
Oliver Drotbohm
2e1223c46c Polishing. 2021-09-29 16:48:14 +02:00
Oliver Drotbohm
13f6704803 Improve documentation of default response body rendering for POST and PUT requests.
Fixes #2063.
2021-09-29 16:48:11 +02:00
Oliver Drotbohm
002174cdc5 Polish Javadoc to prepare builds with JDK 17.
Issue #2068.
2021-09-21 15:30:18 +02:00
Mark Paluch
a4b7972f8d After release cleanups.
See #2051
2021-09-17 09:27:40 +02:00
Mark Paluch
da8ae156fd Prepare next development iteration.
See #2051
2021-09-17 09:27:36 +02:00
Mark Paluch
20fb7e6c8e Release version 3.5.5 (2021.0.5).
See #2051
2021-09-17 09:18:33 +02:00
Mark Paluch
d230060360 Prepare 3.5.5 (2021.0.5).
See #2051
2021-09-17 09:17:30 +02:00
Oliver Drotbohm
b9b974b803 Adapt Content-Type header for HAL FORMS requests based on affordances.
Whenever HAL FORMS is supposed to be rendered, we now adapt the `Content-Type` header depending on whether affordances (and thus `_templates`) are present. If none can be found, we either adapt the header to either `application/hal+json` or even `application/json` depending on the `Accept` header arrangement given. If none match, we reject the request with `406 Not Acceptable`.

Had to reintroduce a dependency on Lombok to use @SneakyThrows as otherwise we cannot throw HttpMediaTypeNotAcceptableException from a ResponseBodyAdvice. A manual implementation of the pattern does not compile on Java 8 (at least on MacOS).

Fixes #2060.
2021-09-14 22:34:15 +02:00
Mark Paluch
306369a237 Upgrade to Maven Wrapper 3.8.2.
See #2059
2021-09-10 15:39:39 +02:00
Oliver Drotbohm
e06ad7282d Avoid reflection in RepositoryRestMvcConfiguration.
We now completely avoid reflection in RepositoryRestMvcConfiguration by delaying all bean lookups that were previously declared through autowired fields.

Fixes #2057.
2021-08-26 15:44:09 +02:00
Oliver Drotbohm
eeee271b36 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, #2054.
2021-08-19 23:31:56 +02:00
Oliver Drotbohm
f2f8775c03 Avoid eager reference to BackendIdConverter beans.
Switched to bean method parameter reference to all BackendIdConverter instances.

Fixes #2055.
2021-08-19 23:19:22 +02:00
Jens Schauder
b65addbed6 After release cleanups.
See #2045
2021-08-12 11:37:31 +02:00