Commit Graph

1621 Commits

Author SHA1 Message Date
Christoph Strobl
5b016f2908 After release cleanups.
See #2229
2023-03-20 15:05:35 +01:00
Christoph Strobl
e5bc3be69a Prepare next development iteration.
See #2229
2023-03-20 15:05:34 +01:00
Christoph Strobl
00884c09c7 Release version 4.1 M3 (2023.0.0).
See #2229
2023-03-20 15:01:48 +01:00
Christoph Strobl
80ee34e1ba Prepare 4.1 M3 (2023.0.0).
See #2229
2023-03-20 15:01:20 +01:00
Mark Paluch
b084f67189 Polishing.
Fix invalid Javadoc references.

See #2239
2023-03-20 08:21:12 +01:00
Oliver Drotbohm
e4bca534bf Support to receive aggregate references as request parameters.
We now support using AggregateReference as type to bind request parameters taking URIs pointing to related aggregates. The default resolution will try to resolve the entire URI via UriToEntityConverter but one can also provide a function that can extract any part of the URI to be then resolved into either an identifier, aggregate instance or jMolecules Association against the ConversionService.

Fixes #2239.
2023-03-19 23:56:39 +01:00
Oliver Drotbohm
6d0034f15f Support for query methods returning a Slice.
Built on the the just introduced RepresentationModelAssembler implementations based on Slice in Spring HATEOAS and Spring Data Commons we now support returning a SlicedModel from the controller backing search resources ultimately triggering repository query methods.

The introduction triggered the refactoring to introduce RepresentationModelAssemblers (RMA) to remove the need for controllers inheriting from AbstractRepositoryController to access RepresentationModel assembly functionality. RMA acts as a facade for both Paged-/SlicedResourceAssembler as well as PersistentEntityResourceAssembler.

Fixes #2235.
2023-03-02 17:20:09 +01:00
Oliver Drotbohm
7c9a5275a3 Polish Javadoc. 2023-02-21 19:01:55 +01:00
Oliver Drotbohm
fb1924286a Use FormattingConversionService in JSON Patch binding.
We no pipe the Spring MVC ConversionService into the JSON Patch path binding. That usually is a FormattingConversionService at runtime and also supports the conversion of dates.

The ConversionServices is configured into the BindContext(Factory) we use for binding. The context then exposes the EvaluationContext set up with it.

Fixes #2233.
2023-02-21 18:43:19 +01:00
Oliver Drotbohm
2a88cc7ea6 Reference document updates for new return body on delete setting. 2023-02-21 17:48:15 +01:00
Oliver Drotbohm
d02d1bb0c1 Support for returning response bodies on deletion of item resources.
RepositoryRestConfiguration now allows to configure to return a response body for the deletion of item resources. The controller implementation follows the same patter we have already established for creation and updates: unless explicitly enabled or disabled we now consider the presence of an accept header as indicator of whether a response body should be rendered.

This could be a "breaking" change for clients having explicitly expected 204 until now even for requests with an Accept header. If that's an issue, those should either explicitly disable the setting, do not submit an Accept header or loosen their expectations to expect either 200 or 2xx as indicator of success in general.

Fixes #2225.
2023-02-21 17:25:28 +01:00
Oliver Drotbohm
7c0fc837a3 Register MVC validator with Spring Data REST HandlerAdapter.
Fixes: #967.
Original pull request: 2108.
2023-02-21 15:46:08 +01:00
zhengchalei
890111f06f Fix doc link end label in ResourceStatus.
Fixes #2139
2023-02-21 14:19:46 +01:00
Kai Toedter
b94f7d4b83 Fix link to HAL Explorer doc in README.adoc.
Fixes: #2151
2023-02-21 14:18:44 +01:00
Oliver Drotbohm
6c4f57f31a Avoid obsolete inspection of DefaultedPageable.
The instance can never be null and thus we don't actually have to check for that.

Fixes #2222
2023-02-21 14:14:38 +01:00
Oliver Drotbohm
b65e0c9118 Adapt to renamed properties by using MappedProperties in association deserialization.
Revert the changes that employed manual annotation lookup as that would cause invalid associations of fields and accessor methods for properties shadow renamed. Instead, we now use MappedProperties that already contains a mapping between the Jackson field names and Sprign Data property names.

Fixes: #2165
2023-02-21 13:26:14 +01:00
Lars Vierbergen
5335fe61e9 Fix mapping URIs to @JsonProperty annotated associations
Normally, when creating and updating (POST/PUT) an entity via the REST endpoints, you can use the URL of the relation target. (e.g.: send `{"package": "/packages/1"}` when `package` is a JPA `@OneToOne` relation).

Now this also takes into account when the JPA relation is annotated with `@JsonProperty` to change the serialized name.

Add unit tests for linkable associations.

Issue: #2165
2023-02-21 13:26:08 +01:00
Mikołaj Matuszewski
8d9855b57e Fix missing explanation for resource type indicator in reference docs. 2023-02-21 11:52:34 +01:00
Oliver Drotbohm
f18491f722 Properly deep-merge nested documents on PUT.
This is needed to consider read-only properties within those objects as those would otherwise get overridden.

Fixes: #2174
2023-02-21 10:36:38 +01:00
Mark Paluch
cdb4a5e053 Upgrade to Maven Wrapper 3.9.0.
See #2230
2023-02-20 11:58:15 +01:00
Christoph Strobl
feea7c0ae1 After release cleanups.
See #2228
2023-02-17 14:25:48 +01:00
Christoph Strobl
8443df3e7d Prepare next development iteration.
See #2228
2023-02-17 14:25:46 +01:00
Christoph Strobl
45d57fe97d Release version 4.1 M2 (2023.0.0).
See #2228
2023-02-17 14:22:31 +01:00
Christoph Strobl
15d3277f6d Prepare 4.1 M2 (2023.0.0).
See #2228
2023-02-17 14:22:18 +01:00
Christoph Strobl
3d4a3a1ad9 After release cleanups.
See #2204
2023-02-17 13:31:54 +01:00
Christoph Strobl
61f9db5935 Prepare next development iteration.
See #2204
2023-02-17 13:31:53 +01:00
Christoph Strobl
3c32219d6b Release version 4.1 M1 (2023.0.0).
See #2204
2023-02-17 13:27:50 +01:00
Christoph Strobl
378d3505b4 Prepare 4.1 M1 (2023.0.0).
See #2204
2023-02-17 13:27:10 +01:00
Mark Paluch
20354cdf7b Upgrade to MongoDB Driver 4.9.0.
Closes #2224
2023-02-14 10:52:50 +01:00
Mark Paluch
dcc4609b3b Update CI properties.
See #2204
2023-01-30 10:49:50 +01:00
Mark Paluch
24070f2b59 Upgrade to Maven Wrapper 3.8.7.
See #2221
2023-01-30 10:48:17 +01:00
Oliver Drotbohm
0db1adadd0 Register StdValueInstantiator._constructorArguments for reflection.
The field is looked up by reflection in ValueInstantiatorCustomizer.

Fixes #2213.
2023-01-20 16:35:30 +01:00
Oliver Drotbohm
a7765c9e5b Fix links in reference documentation.
Primarily references to Spring Framework docs and one https update.

Fixes #2218.
2023-01-18 10:02:13 +01:00
Oliver Drotbohm
0938b9726e Fix links to Spring Framework's CORS documentation.
Fixes #2215.
2023-01-09 17:00:49 +01:00
Oliver Drotbohm
77c0322d1b Upgrade test source compile level to Java 17.
Also, remove custom Jackson library version for Hibernate integration.
2023-01-09 16:47:53 +01:00
Oliver Drotbohm
b77f6cead7 Additional test cases for default CORS setup on repositories.
We now also assert on the Access-Control-Allow-Origin to default to * in case no more detailed configuration was set up.

Issue #2208.
2023-01-09 16:41:48 +01:00
Oliver Drotbohm
1bfa83cb73 Register per-repository pattern for observability purposes.
The standard Spring MVC observability integration registers the plain request pattern for observations. For our repository controllers that would result in one pattern registered for all individual repository resources (e.g. /{repository}/{id} etc.). However, the insights users would like to gain rather follows the individual repositories exposed. That's why we have so far exposed repository specific path pattern (/myrepo/{id}) via a custom request attribute. To adhere to the new observability integration of Spring Framework 6, we need to expose that particular pattern on the ServerRequestObservationContext, too.

Fixes #2212.
2023-01-09 15:31:57 +01:00
Oliver Drotbohm
2c8ff9fe04 Upgrade to HAL Explorer 1.2.
Fixes GH-2214.
2023-01-06 20:02:01 +01:00
Mark Paluch
f0e86b9a17 Extend license header copyright years to 2023.
See #2211
2023-01-02 09:53:37 +01:00
Christoph Strobl
6f68fe814f Add Nullable annotation to parameter of overridden equals method.
Closes: #2196
Original pull request: #2197
2022-12-02 11:16:15 +01:00
Mark Paluch
a9bfcfeb57 Update CI properties.
See #2204
2022-11-18 15:31:11 +01:00
Mark Paluch
3e762efbdd After release cleanups.
See #2190
2022-11-18 14:30:20 +01:00
Mark Paluch
98aefe0c85 Prepare next development iteration.
See #2190
2022-11-18 14:30:19 +01:00
Mark Paluch
eb10fb1e41 Release version 4.0 GA (2022.0.0).
See #2190
2022-11-18 14:26:23 +01:00
Mark Paluch
c35086c7c4 Prepare 4.0 GA (2022.0.0).
See #2190
2022-11-18 14:26:13 +01:00
Mark Paluch
f74daa349a Upgrade to MongoDB Driver 4.8.0.
Closes #2201
2022-11-17 09:12:30 +01:00
Jens Schauder
1968b4e76f Replace New and Noteworthy with links to release notes.
Closes #2199
See spring-projects/spring-data-relational#1351
2022-11-10 15:10:11 +01:00
Mark Paluch
f69ff86d59 Bump test dependency versions.
See #2195
2022-11-07 15:54:47 +01:00
Mark Paluch
c3c9da67f2 Upgrade to JPA API 3.1 and Servlet API 6.1.
Closes #2195
2022-11-07 15:54:22 +01:00
Mark Paluch
fa51cdc7fc After release cleanups.
See #2192
2022-11-04 15:26:39 +01:00