As the title says, I have a resource object Product
extending ResourceSupport
. However, the responses I receive have the property \"_links\" instea
I am sure you are using Spring data with @RepositoryRestResource annotation
@RepositoryRestResource
public interface XX extends CrudRepository
If you want to remove default HAL behavior you can add following annotaion param
@RepositoryRestResource(exported = false)
public interface XX extends CrudRepository
Above configurition Spring Data REST to only expose rest endpoints for resources in the parent project, without having to explicitly annotate every repository in the dependency project.
As per doc
Hiding certain repositories, query methods, or fields You may not want a certain repository, a query method on a repository, or a field of your entity to be exported at all. Examples include hiding fields like password on a User object or similar sensitive data. To tell the exporter to not export these items, annotate them with @RestResource and set exported = false.
For example, to skip exporting a Repository:
@RepositoryRestResource(exported = false)
interface PersonRepository extends CrudRepository {}