本文整理匯總了Java中org.springframework.hateoas.LinkDiscoverers類的典型用法代碼示例。如果您正苦於以下問題:Java LinkDiscoverers類的具體用法?Java LinkDiscoverers怎麽用?Java LinkDiscoverers使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
LinkDiscoverers類屬於org.springframework.hateoas包,在下文中一共展示了LinkDiscoverers類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: linkDiscoverersCreated
import org.springframework.hateoas.LinkDiscoverers; //導入依賴的package包/類
@Test
public void linkDiscoverersCreated() throws Exception {
this.context = new AnnotationConfigWebApplicationContext();
this.context.setServletContext(new MockServletContext());
this.context.register(BaseConfig.class);
this.context.refresh();
LinkDiscoverers discoverers = this.context.getBean(LinkDiscoverers.class);
assertThat(discoverers).isNotNull();
LinkDiscoverer discoverer = discoverers.getLinkDiscovererFor(MediaTypes.HAL_JSON);
assertThat(HalLinkDiscoverer.class.isInstance(discoverer)).isTrue();
}
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:12,代碼來源:HypermediaAutoConfigurationTests.java
示例2: linkDiscoverersCreated
import org.springframework.hateoas.LinkDiscoverers; //導入依賴的package包/類
@Test
public void linkDiscoverersCreated() throws Exception {
this.context = new AnnotationConfigWebApplicationContext();
this.context.setServletContext(new MockServletContext());
this.context.register(BaseConfig.class);
this.context.refresh();
LinkDiscoverers discoverers = this.context.getBean(LinkDiscoverers.class);
assertNotNull(discoverers);
LinkDiscoverer discoverer = discoverers.getLinkDiscovererFor(MediaTypes.HAL_JSON);
assertTrue(HalLinkDiscoverer.class.isInstance(discoverer));
}