Spring-HATEOAS without extending ResourceSupport
hateoas, rest, spring, spring-hateoas, spring-mvc
Solution
You can use the `Resource` wrapper:
MyModel model = ...
Resource<MyModel> resource = new Resource(model);
resource.add(linkTo(...
Problem
I'm building a REST API. I have a domain model composed of beans than can't extend ResourceSupport. Which is the best way to expose them as resources using Spring-HATEOAS? In case that's not possible, which is the best way to include links on the JSON generated by the beans?