-
Notifications
You must be signed in to change notification settings - Fork 0
springboot
spring:
hateoas:
use-hal-as-default-json-media-type: falsespring.hateoas.use-hal-as-default-json-media-type=false
Posted bymarc January 4, 2021 Leave a commenton Hateoas on SpringBoot 2.2 I used to have hateoas on a SpringBoot 2.1 (or lower application) and, since I upgraded to 2.2 I am facing errors about missing classes like ResourceAssemblerSupport, ResourceSupport…
SpringBoot 2.2 has upgraded its internal hateoas dependency to version 1.x which comes with breaking changes.
Major changes are :
ResourceSupport changed to RepresentationModel
Resource changed to EntityModel
Resources changed to CollectionModel
PagedResources changed to PagedModel
ResourceAssembler changed to RepresentationModelAssembler
ResourceAssemblerSupport changed to RepresentationModelAssemblerSupport
So you have to update the code accordingly. Please note also that method names have changed.