We're starting a new project, and we're looking into using spring-hateoas / hypermedia. The HAL browser also looks interesting, so we wanted to check it out.
However, the HAL browser seems bundled to spring-data-rest, which we don't want to use (for different reasons).
At a minimum we don't want to auto-expose all repositories as rest-resources, but when doing this we need to explicity define the links for the HAL browser in addition to defining the links with spring-hateoas.
When NOT auto-exposing the repositories, we have to define
implements ResourceProcessor<RepositoryLinksResource>
and
@Override
RepositoryLinksResource process(RepositoryLinksResource resource) {
resource.add(link('/{id}').withRel('my-dummy'))
return resource
}
in addition to already defined links (using hateoas)
link('/{id}').expand(entity.id).withSelfRel()
This seems cumbersome, and doesnt comply with the DRY principle. We would rather not implement the @Override method RepositoryLinksResource process(RepositoryLinksResource resource) as these links are already defined elsewhere.
My initial thought was that the HAL browser would re-use the links already defined with hateoas. But apparanlty I did not understand it correctly?
So the question is
Is there a way of using the spring-bundled HAL browser without using spring-data-rest?
And without having to manually define the links explicitly for the HAL browser when not auto-exposing the repositories?