Skip to content

Instantly share code, notes, and snippets.

@caprica
Created June 21, 2022 09:34
Show Gist options
  • Save caprica/1daff59d4b5ad9737d33f6dccdca2bda to your computer and use it in GitHub Desktop.
Save caprica/1daff59d4b5ad9737d33f6dccdca2bda to your computer and use it in GitHub Desktop.
Banish Spring Boot HATEOAS ugly responses
# Instead of returning JSON with "_embedded" HATEOAS structures (e.g. when returning PagedModel), use a nicer format
# with "links", "content" and "page".
#
# The media type on the controller method should be "application/json", NOT "application/hal+json".
spring.hateoas.use-hal-as-default-json-media-type=false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment