Skip to content
Advertisement

Spring boot HATEOAS integration issue

I have included hateoas dependency in my spring boot project but I am unable to run the project because of few exceptions that are being shown. I have tried cleaning the workspace, mvn clean install and also restarting the application but it’s not working. Is there something I am missing here?

pom.xml

JavaScript

Exception

JavaScript

Advertisement

Answer

As you are using 2.2.6.RELEASE try using the latest version of hateoas 1.0.4.RELEASE as suggested by Amir. Just note by doing so you will have to change some imports as the name of some Classes have been changed and moved. See here https://docs.spring.io/spring-hateoas/docs/current/reference/html/ for example

import static org.springframework.hateoas.mvc.ControllerLinkBuilder.*;

should be replaced by

import static org.springframework.hateoas.server.mvc.WebMvcLinkBuilder.*;

Resource is now EntityModel. And so on …

I hope this help

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement