Commit Graph

208 Commits

Author SHA1 Message Date
Oliver Drotbohm
92af07252f Upgrade MongoDB tests to sync driver 4.4.
Fixes #2076.
2021-10-14 17:40:58 +02:00
Oliver Drotbohm
1828a6a2a7 Switch to JUnit 5.
Issue #2075.
2021-10-12 22:29:45 +02:00
Oliver Drotbohm
94dec6bfef Adapt to removed deprecations in Spring HATEOAS 1.4.
Fixes #2072.
2021-10-08 11:02:55 +02:00
Oliver Drotbohm
388a04358c Integration test to verify securing findById(…) generally works.
Issue: #2070.
2021-10-07 13:19:54 +02:00
Oliver Drotbohm
c0125c99a8 Qualify references to ResourceType.COLLECTION to avoid ambiguities to AssertJ in tests.
Fixes #2071.
2021-10-06 12:35:09 +02:00
Oliver Drotbohm
46dc6e03fc 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:13:37 +02:00
Mark Paluch
0cb5c3289f Prepare next development iteration.
See #2052
2021-09-17 09:52:19 +02:00
Mark Paluch
907b15e83b Release version 3.6 M3 (2021.1.0).
See #2052
2021-09-17 09:44:58 +02:00
Oliver Drotbohm
1dae476040 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:49:05 +02:00
Jens Schauder
4f9ccaac0e Prepare next development iteration.
See #2046
2021-08-12 15:16:22 +02:00
Jens Schauder
f8bdb374ea Release version 3.6 M2 (2021.1.0).
See #2046
2021-08-12 15:03:18 +02:00
Jens Schauder
5e08842c1b Prepare next development iteration.
See #2001
2021-07-16 14:19:56 +02:00
Jens Schauder
8d0e00be94 Release version 3.6 M1 (2021.1.0).
See #2001
2021-07-16 14:09:26 +02:00
Oliver Drotbohm
161a3a9499 Allow customization of LinkCollector.
LinkCollector is now an interface. The actual implementation has been moved to DefaultLinkCollector. RepositoryRestConfigurer now has a customizeLinkCollector(…) callback method to tweak or even completely replace the LinkCollector instance.

Fixes #2042.
2021-07-15 08:15:20 +02:00
Oliver Drotbohm
f310a4ce58 Upgrade Spring Security tests for 5.5.1. 2021-07-14 17:38:04 +02:00
Oliver Drotbohm
a8c39eb9f8 Adapt test cases to adhere to RFC URI template expansion. 2021-07-14 17:33:47 +02:00
Oliver Drotbohm
b6cefe4d9a 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.
2021-07-13 15:13:28 +02:00
Oliver Drotbohm
752d888db7 Upgrade MongoDB driver to 4.3.0-beta4 for integration tests. 2021-07-13 09:33:31 +02:00
Oliver Drotbohm
c227013f27 Upgrade to Spring Security 5.5.0.
Fixes #2020.
2021-06-08 15:46:36 +02:00
Greg L. Turnquist
bc5478ec49 Drop explicit dependency on JSON Path.
Let Spring HATEOAS bring in this dependency.

See #2018.
2021-06-03 12:11:21 -05:00
Mark Paluch
0a31ef1d84 Prepare next development iteration.
See #1992
2021-04-14 14:30:12 +02:00
Mark Paluch
8a690929f0 Release version 3.5 GA (2021.0.0).
See #1992
2021-04-14 14:18:49 +02:00
Oliver Drotbohm
21ed68262f 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 20:07:53 +02:00
Mark Paluch
8e42a2a221 Prepare next development iteration.
See #1976
2021-03-31 17:24:04 +02:00
Mark Paluch
d77e5192d8 Release version 3.5 RC1 (2021.0.0).
See #1976
2021-03-31 17:05:09 +02:00
Oliver Drotbohm
17538c65d7 Enable rendering as HAL FORMS.
We're now registering an HttpMessageConverter to render requests for HAL FORMS using the HalFormsConfiguration present in the application.

We're currently not adding any affordances yet. The change solely enables user code to add affordances explicitly, e.g. via RepresentationModelProcessor implementations.

Fixes: #1991.
2021-03-25 18:01:54 +01:00
Mark Paluch
0f93b050ce Prepare next development iteration.
See #1986
2021-03-17 11:30:29 +01:00
Mark Paluch
54696d4d5f Release version 3.5 M5 (2021.0.0).
See #1986
2021-03-17 11:17:50 +01:00
Oliver Drotbohm
e9bc98a1e9 #1980 - RepositoryEntityLinks now overrides ….linkForItemResource(…). 2021-02-24 17:57:46 +01:00
Christoph Strobl
08ca20422d Prepare next development iteration.
See #1978
2021-02-18 11:35:21 +01:00
Christoph Strobl
d03e364294 Release version 3.5 M4 (2021.0.0).
See #1978
2021-02-18 11:25:13 +01:00
Christoph Strobl
d5d2659a24 Prepare next development iteration.
See #1954
2021-02-17 14:17:48 +01:00
Christoph Strobl
44b93173a7 Release version 3.5 M3 (2021.0.0).
See #1954
2021-02-17 14:00:09 +01:00
Oliver Drotbohm
9ee4c62b01 #1971 - Upgrade MongoDB tests to 4.2 drivers. 2021-02-16 16:46:21 +01:00
Christoph Strobl
6384110dab Prepare next development iteration.
See #1944
2021-01-13 15:46:58 +01:00
Christoph Strobl
e2523e35d0 Release version 3.5 M2 (2021.0.0).
See #1944
2021-01-13 15:34:04 +01:00
Mark Paluch
7afe7f1a9c Update copyright year to 2021.
Closes #1952
2021-01-12 11:45:16 +01:00
Mark Paluch
f58ea84c43 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:58 +01:00
Mark Paluch
fba7b7bd55 DATAREST-1578 - Prepare next development iteration. 2020-12-09 15:32:17 +01:00
Mark Paluch
2b61b8640f DATAREST-1578 - Release version 3.5 M1 (2021.0.0). 2020-12-09 15:21:57 +01:00
Mark Paluch
c770f277b0 DATAREST-1587 - Remove Solr integration tests. 2020-12-09 15:17:42 +01:00
Oliver Drotbohm
38f2bc4598 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:35:25 +01:00
Oliver Drotbohm
328ea26244 DATAREST-1542 - Remove dependency to Spring WebMVC from core module.
Finally remove the dependency to Spring WebMVC from Spring Data REST's core module. Removed previously deprecated methods and update test configuration applying customizations.

Related tickets: DATAREST-1543.
2020-11-30 13:55:52 +01:00
Mark Paluch
378a7d3971 DATAREST-1570 - Prepare next development iteration. 2020-10-28 16:10:22 +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