Add @EnableEntityLinks to hypermedia support
This commit is contained in:
@@ -19,6 +19,7 @@ package org.springframework.boot.autoconfigure.hateoas;
|
||||
import org.junit.After;
|
||||
import org.junit.Test;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.hateoas.EntityLinks;
|
||||
import org.springframework.hateoas.LinkDiscoverer;
|
||||
import org.springframework.hateoas.LinkDiscoverers;
|
||||
import org.springframework.hateoas.MediaTypes;
|
||||
@@ -58,6 +59,15 @@ public class HypermediaAutoConfigurationTests {
|
||||
assertTrue(HalLinkDiscoverer.class.isInstance(discoverer));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void entityLinksCreated() throws Exception {
|
||||
this.context = new AnnotationConfigWebApplicationContext();
|
||||
this.context.register(HypermediaAutoConfiguration.class);
|
||||
this.context.refresh();
|
||||
EntityLinks discoverers = this.context.getBean(EntityLinks.class);
|
||||
assertNotNull(discoverers);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void doesBackOffIfEnableHypermediaSupportIsDeclaredManually() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user