You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
spring-hateoas has introduced MediaTypeConfigurationCustomizer, which can be used to configure/modify HalConfiguration and HalFormsConfiguration in an additive way instead of overwriting the whole bean. (see spring-projects/spring-hateoas#2035)
However, these customizers are not applied in spring-data-rest where HalConfiguration or HalFormsConfiguration are used (in RepositoryRestMvcConfiguration), leading to an inconsistency between the configuration as used by spring-hateoas and the one used by spring-data-rest.
I bumped into this because I am using a customizer-based configuration, and its behavior is different when using only spring-hateoas or when having a dependency on spring-data-rest-webmvc (even though it is not being used for this particular endpoint).
I have an example application displaying the issue here: invoice-api.zip.
This shows the issue with spring-data-rest-webmvc.
To see the behavior without spring-data-rest-webmvc, either uncomment the exclude line in build.gradle or remove the whole dependeny on the spring-data-rest starter)
The text was updated successfully, but these errors were encountered:
spring-hateoas has introduced
MediaTypeConfigurationCustomizer
, which can be used to configure/modifyHalConfiguration
andHalFormsConfiguration
in an additive way instead of overwriting the whole bean. (see spring-projects/spring-hateoas#2035)However, these customizers are not applied in spring-data-rest where
HalConfiguration
orHalFormsConfiguration
are used (inRepositoryRestMvcConfiguration
), leading to an inconsistency between the configuration as used by spring-hateoas and the one used by spring-data-rest.I bumped into this because I am using a customizer-based configuration, and its behavior is different when using only spring-hateoas or when having a dependency on spring-data-rest-webmvc (even though it is not being used for this particular endpoint).
Without spring-data-rest-webmvc, the response looks like expected (the
supplier
link is an array, even though only one link item is present)When adding a dependency on spring-data-rest-webmvc, the 'render single links' customization seems to get ignored, falling back to the default:
I have an example application displaying the issue here:
invoice-api.zip.
This shows the issue with spring-data-rest-webmvc.
To see the behavior without spring-data-rest-webmvc, either uncomment the exclude line in
build.gradle
or remove the whole dependeny on the spring-data-rest starter)The text was updated successfully, but these errors were encountered: