How to prevent Spring boot from calling Hateoas org.springframework.hateoas.mvc.UriComponentsContributor

29 views Asked by At

My pom.xml looks like this:

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

But somehow it seems to call the UriComponentsContributpr in spring-hateoas. Is Spring-hateoas a mandatory dependency for spring-boot-starter-web? I get 5he following error

`Caused by: java.lang.NoClassDefFoundError: org/springframework/hateoas/mvc/UriComponentsContributor error` when running the build. 

Thanks,
Paddy

I tried including spring-hateoas from lower to higher versions. With lower versions it still throws same error but with higher versions it throws Java version mismatch issue since due to legacy reasons I code is only Java 1.8 compatible.The Spring boot version I am using is 2.7.0

0

There are 0 answers