spring-hateoas icon indicating copy to clipboard operation
spring-hateoas copied to clipboard

EnableWebMvc required to get Hypermedia Support working

Open ecattez opened this issue 2 years ago • 0 comments

Hello, I discovered recently that @EnableWebMvc is required in order to get @EnableHypermediaSupport working.

I'm using the spring-boot-dependencies like below:

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <version>${spring-boot.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

Should spring-hateoas enable web mvc automatically ?

If i don't put the EnableWebMvc annotation, I get links instead of _links because default content-type (HAL) is not taken for application/json

ecattez avatar Aug 11 '22 13:08 ecattez