本文整理汇总了Java中org.springframework.hateoas.EntityLinks类的典型用法代码示例。如果您正苦于以下问题:Java EntityLinks类的具体用法?Java EntityLinks怎么用?Java EntityLinks使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
EntityLinks类属于org.springframework.hateoas包,在下文中一共展示了EntityLinks类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ShoppingListRestController
import org.springframework.hateoas.EntityLinks; //导入依赖的package包/类
@Autowired
public ShoppingListRestController(SLUserService slUserService, ShoppingListService shoppingListService,
ShoppingListRequestHandler requestHandler, ShoppingListResourceProcessor resourceProcessor,
EntityLinks entityLinks) {
super(slUserService, shoppingListService, requestHandler, resourceProcessor, entityLinks);
}
示例2: setup
import org.springframework.hateoas.EntityLinks; //导入依赖的package包/类
@Before
public void setup() {
mockMvcBuilder = standaloneSetup(new FooController(mock(EntityLinks.class)));
DefaultFormattingConversionService service = new DefaultFormattingConversionService();
service.addConverter(new StringToUuidConverter());
mockMvcBuilder.setMessageConverters(jackson2HttpMessageConverter()).setConversionService(service);
RestAssuredMockMvc.standaloneSetup(mockMvcBuilder);
}
示例3: entityLinksCreated
import org.springframework.hateoas.EntityLinks; //导入依赖的package包/类
@Test
public void entityLinksCreated() throws Exception {
this.context = new AnnotationConfigWebApplicationContext();
this.context.setServletContext(new MockServletContext());
this.context.register(BaseConfig.class);
this.context.refresh();
EntityLinks discoverers = this.context.getBean(EntityLinks.class);
assertThat(discoverers).isNotNull();
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:10,代码来源:HypermediaAutoConfigurationTests.java
示例4: getPluginFor
import org.springframework.hateoas.EntityLinks; //导入依赖的package包/类
/**
* Returns the plugin for the given type or throws an {@link IllegalArgumentException} if no delegate
* {@link EntityLinks} can be found.
*
* @param type must not be {@literal null}.
* @return
*/
private EntityLinks getPluginFor(Class<?> type) {
EntityLinks plugin = delegates.getPluginFor(type);
if (plugin == null) {
throw new IllegalArgumentException(String.format(
"Cannot determine link for %s! No EntityLinks instance found supporting the domain type!", type.getName()));
}
return plugin;
}
示例5: ItemRestController
import org.springframework.hateoas.EntityLinks; //导入依赖的package包/类
@Autowired
public ItemRestController(SLUserService slUserService, ItemService itemService, ItemRequestHandler requestHandler,
ItemResourceProcessor resourceProcessor, EntityLinks entityLinks, ShoppingListRestController shoppingListRestController) {
super(slUserService, itemService, requestHandler, resourceProcessor, entityLinks);
this.shoppingListRestController = shoppingListRestController;
}
示例6: ItemResourceProcessor
import org.springframework.hateoas.EntityLinks; //导入依赖的package包/类
@Autowired
public ItemResourceProcessor(EntityLinks entityLinks, ArticleService articleService, ItemService itemService) {
super(entityLinks);
this.itemService = itemService;
this.articleService = articleService;
}
示例7: ShoppingListResourceProcessor
import org.springframework.hateoas.EntityLinks; //导入依赖的package包/类
@Autowired
public ShoppingListResourceProcessor(EntityLinks entityLinks, SLUserService slUserService,
ItemService itemService) {
super(entityLinks);
this.slUserService = slUserService;
this.itemService = itemService;
}
示例8: SLUserRestController
import org.springframework.hateoas.EntityLinks; //导入依赖的package包/类
@Autowired
public SLUserRestController(SLUserService slUserService, EntityService<SLUser, String> entityService,
RequestHandler<SLUser> requestHandler, MyResourceProcessor<SLUser> resourceProcessor, EntityLinks entityLinks,
CurrentUserService currentUserService, ShoppingListRestController shoppingListRestController) {
super(slUserService, entityService, requestHandler, resourceProcessor, entityLinks);
this.currentUserService = currentUserService;
this.shoppingListRestController = shoppingListRestController;
}
示例9: ArticleResourceProcessor
import org.springframework.hateoas.EntityLinks; //导入依赖的package包/类
@Autowired
public ArticleResourceProcessor(EntityLinks entityLinks, SLUserService slUserService,
ArticleService articleService) {
super(entityLinks);
this.slUserService = slUserService;
this.articleService = articleService;
}
示例10: entityLinksCreated
import org.springframework.hateoas.EntityLinks; //导入依赖的package包/类
@Test
public void entityLinksCreated() throws Exception {
this.context = new AnnotationConfigWebApplicationContext();
this.context.setServletContext(new MockServletContext());
this.context.register(BaseConfig.class);
this.context.refresh();
EntityLinks discoverers = this.context.getBean(EntityLinks.class);
assertNotNull(discoverers);
}
示例11: ModelResourceAssembler
import org.springframework.hateoas.EntityLinks; //导入依赖的package包/类
public ModelResourceAssembler(Class<?> controllerClass, EntityLinks entityLinks) {
super(controllerClass, FilterableResource.class);
this.modelController = controllerClass;
this.entityLinks = entityLinks;
TypeToken<T> typeToken = new TypeToken<T>(getClass()) {};
this.model = (Class<T>) typeToken.getRawType();
}
示例12: rootEndpoint
import org.springframework.hateoas.EntityLinks; //导入依赖的package包/类
@Bean
public RootEndpoint rootEndpoint(EntityLinks entityLinks) {
return new RootEndpoint(entityLinks);
}
开发者ID:spring-cloud,项目名称:spring-cloud-dataflow-metrics-collector,代码行数:5,代码来源:MetricsCollectorConfiguration.java
示例13: RootEndpoint
import org.springframework.hateoas.EntityLinks; //导入依赖的package包/类
public RootEndpoint(EntityLinks entityLinks) {
this.entityLinks = entityLinks;
}
示例14: rootController
import org.springframework.hateoas.EntityLinks; //导入依赖的package包/类
@Bean
public RootController rootController(EntityLinks entityLinks) {
return new RootController(entityLinks);
}
示例15: FooController
import org.springframework.hateoas.EntityLinks; //导入依赖的package包/类
public FooController(EntityLinks entityLinks, FooResourceAssembler assembler) {
this.entityLinks = entityLinks;
this.assembler = assembler;
}