Closed burkedavison closed 1 month ago
You're correct, and we can certainly consider this a bug. I'll have to reach out to the Boot team to find out why the current guard is not triggered. Spring Boot's autoconfiguration for Spring Data's web support actually carries @EnableSpringDataWebSupport
.
I've created spring-projects/spring-data-commons#3101. We should be able to get a fix for this into the next service releases (in T-2w).
Fixes should be available in both the 3.3.1 and 3.4.0 snapshots.
Thank you for the fast resolution, @odrotbohm !
@odrotbohm , could you verify that the below understanding is correct? Do you have any recommendations to resolve this issue?
PR https://github.com/GoogleCloudPlatform/spring-cloud-gcp/pull/2923 shows the following test failure when updating from Spring Boot 3.2 to 3.3:
The test is verifying that
urlSafeCursor
(defined in Spring Cloud GCP's DatastorePageable) is part of the response body. I've tracked the change in behavior down to Spring Data's new registration ofPagedModel
which is now used when serializing aPageImpl
with Jackson. ThisPageModel
class produces the serializedpage
entry in the above 'actual' test results. This change was made "to make sure the representations stay stable and do not expose unnecessary implementation details".I believe the intent was to introduce this new converter as opt-in only to preserve backward compatibility, based on the documentation for this change
and the commit message
However, the logic determining the activation of this converter is only backwardly compatible for users of the
@EnableSpringDataWebSupport
annotation. If the annotation is not being used, the default behavior is to now use thePagedModel
converter.I believe the intent was for the logic to be:
Add'l References
@EnableSpringDataWebSupport
: https://github.com/GoogleCloudPlatform/spring-cloud-gcp/tree/main/spring-cloud-gcp-samples/spring-cloud-gcp-data-datastore-basic-sample