Closed vierbergenlars closed 5 days ago
There is another problem introduced in that version of spring-data-rest (https://github.com/spring-projects/spring-data-rest/issues/2425), which may make the tests fail anyways on spring boot 3.3.5.
I already wanted to get this PR opened because I had to fix this issue anyways during my investigation into why our contentgrid-spring tests were failing
As of spring boot 3.4.0, the issue mentioned above is resolved. But spring-data-rest has still changed which class they pass to canRead
, so this PR makes it support both.
Thanks @vierbergenlars
In spring-data-rest 4.4.0, the logic has changed and now
RepresentationModel
is being passed tocanRead()
instead ofPersistentEntityResource
.To support both versions of spring-data-rest for a while, we can wrap all message converters with one that supports multipart and converts it to JSON. This also allows users to configure their own specific HttpMessageConverters and have it automatically work with multipart as well.