Commit Graph

1478 Commits

Author SHA1 Message Date
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
Oliver Drotbohm
eae472b9f9 Polishing. 2021-09-29 16:50:01 +02:00
Oliver Drotbohm
6d19e968ae Improve documentation of default response body rendering for POST and PUT requests.
Fixes #2063.
2021-09-29 16:50:01 +02:00
Mark Paluch
7e34f6f18a Refine CI triggers.
See #2068
2021-09-29 14:24:06 +02:00
Oliver Drotbohm
d09a85f540 Upgrade to HAL Explorer 1.0.1.
Fixes #2069
2021-09-22 10:26:39 +02:00
Oliver Drotbohm
cfb7079fb8 Tweak CI build to run compatibility builds against JDK 17.
Issue #2068.
2021-09-21 17:03:12 +02:00
Oliver Drotbohm
c6b77e3dd9 Polish Javadoc to prepare builds with JDK 17.
Issue #2068.
2021-09-21 16:36:26 +02:00
Mark Paluch
806a886df1 After release cleanups.
See #2052
2021-09-17 09:52:22 +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
Mark Paluch
d7fe26a656 Prepare 3.6 M3 (2021.1.0).
See #2052
2021-09-17 09:44:35 +02:00
Oliver Drotbohm
78cdba8225 Upgrade to EvoInflector 1.3.
Fixes #2062
2021-09-16 14:41:55 +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
Mark Paluch
291390a423 Upgrade to Maven Wrapper 3.8.2.
See #2058
2021-09-10 15:38:04 +02:00
Oliver Drotbohm
2aca2b24e0 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:38:47 +02:00
Oliver Drotbohm
9cd9e1cef9 Avoid eager reference to BackendIdConverter beans.
Switched to bean method parameter reference to all BackendIdConverter instances.

Fixes #2055.
2021-08-19 23:19:08 +02:00
Jens Schauder
160f35ed10 After release cleanups.
See #2046
2021-08-12 15:16:23 +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
d789f993d0 Prepare 3.6 M2 (2021.1.0).
See #2046
2021-08-12 15:02:57 +02:00
Oliver Drotbohm
2173212113 Upgrade to HAL Explorer 1.0.
Also removed obsolete version property for HAL Explorer.

Fixes #2049.
2021-08-03 14:23:20 +02:00
Jens Schauder
0a04a84e99 After release cleanups.
See #2001
2021-07-16 14:19:58 +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
Jens Schauder
df7a7b3ee8 Prepare 3.6 M1 (2021.1.0).
See #2001
2021-07-16 14:08:59 +02:00
Jens Schauder
99f6e6cfb0 Updated changelog.
See #2001
2021-07-16 14:08:52 +02:00
Jens Schauder
5e1465a0df Updated changelog.
See #2030
2021-07-16 10:48:19 +02:00
David Lozano Jarque
13066a7ce1 Reintroduce link to "Understanding HATEOAS" document.
As the "understanding" section is not published any more, move link to Markdown file in the GitHub repository.

Original ticket: DATAREST-1392. Fixes #356.
2021-07-16 09:17:09 +02:00
Max Brauer
aea406cb68 Fix incomplete sentence in reference docs of association resources.
Fixes #372.
2021-07-16 09:10:17 +02:00
Thomas Küstermann
659188bdc1 Update documentation link to Spring HATEOAS's method links
Prefer link to official HATEOAS documentation rather than linking to the Github project README.
2021-07-16 09:07:26 +02:00
Joe Greubel
7bb34d7847 Correct resource name in query method section.
Fixes #370.
2021-07-16 08:51:59 +02:00
Jay Bryant
ace69c5e8d Wording changes
Removed the language of oppression and violence and replaced it with more neutral language.

Note that problematic words in the code have to remain in the docs until the code changes.

Fixes #379.
2021-07-16 00:10:48 +02:00
Oliver Drotbohm
3838214d54 Consistent anchor names for headings in documentation. 2021-07-15 16:31:00 +02:00
Oliver Drotbohm
8a1d147009 Remove 3.x deprecations.
Removed all deprecations that have accumulated in the 3.x timeline so far.
2021-07-15 08:20:11 +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
0c24113484 Dedicated customization callback for AuditableBeanWrapperFactory.
Introduced RepositoryRestConfigurer.customizeAuditableBeanWrapperFactory(…) so that implementations can customize the default instance provided by RepositoryRestMvcConfiguration.

Fixes #2040.
2021-07-14 19:01:11 +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
2aa069bed7 Tweak upstream CI triggers to reduce build load.
We now only build upon changes made to Spring HATEOAS and Spring Data Commons.
2021-07-13 13:03:07 +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
b678ce6bc9 PersistentEntitiesResourceMapping.hasMappingFor(…) should lookup metadata on cache miss. 2021-07-13 09:27:03 +02:00
Oliver Drotbohm
e1dd82c927 Prevent NullPointerException in AggregateReferenceDeserializerModifier.
In AggregateReferenceDeserializerModifier we now look up the original property name on the Jackson metadata before trying to resolve the property target type. We also explicitly guard against null values returned from that lookup and opt out of the customization in those cases.
2021-07-13 09:25:57 +02:00
Oliver Drotbohm
940a676e6d RepositoryResourceMappings now processes all entities to detect repository mappings.
We now consider all registered PersistentEntity instances and try to detect repository metadata for them. A case we didn't cover before was that a repository was declared for an aggregate super type but the actual child aggregate class didn't have a dedicated repository declared. While this is a perfectly valid scenario, the mapping information was broken as it fell back on the plain domain type information and produced paths and relation names derived from that, even if there's a super type repository available.

Thus, solely traversing the aggregate types we have repositories registered for is not enough. We now traverse all known PersistentEntity types and also register repository metadata for all types that are assignable to a known domain type. The latter is actually implemented in Spring Data Commons' Repositories via spring-projects/spring-data-commons#2406.
2021-07-07 16:20:09 +02:00
Mark Paluch
ab007212b7 Updated changelog.
See #2012
2021-06-22 16:07:28 +02:00
Mark Paluch
51df034bbc Updated changelog.
See #2011
2021-06-22 15:29:54 +02:00
Oliver Drotbohm
4e1c949fb9 Remove explicit Spring HATEOAS snapshot version.
See #2019.
2021-06-22 15:13:41 +02:00
Greg L. Turnquist
dd2a07e449 Use project-specific containers for CI testing.
This project shall maintain its own containers for CI testing purposes, instead of depending upon Spring Data MongoDB's containers.

See #2027.
2021-06-17 17:12:56 -05:00
Oliver Drotbohm
e2f8d2f2c4 Avoid using Guava's Charset.
Replaced with Java's StandardCharset. Fixes #2026.
2021-06-17 21:16:14 +02:00