• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java RelProvider类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.springframework.hateoas.RelProvider的典型用法代码示例。如果您正苦于以下问题:Java RelProvider类的具体用法?Java RelProvider怎么用?Java RelProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



RelProvider类属于org.springframework.hateoas包,在下文中一共展示了RelProvider类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: HalHandlerInstantiator

import org.springframework.hateoas.RelProvider; //导入依赖的package包/类
public HalHandlerInstantiator(RelProvider resolver, CurieProvider curieProvider,
                              MessageSourceAccessor messageSource, boolean enforceEmbeddedCollections) {

    EmbeddedMapper mapper = new EmbeddedMapper(resolver, curieProvider, enforceEmbeddedCollections);

    Assert.notNull(resolver, "RelProvider must not be null!");
    this.instanceMap.put(HalResourcesSerializer.class, new HalResourcesSerializer(mapper));
    this.instanceMap.put(HalLinkListSerializer.class,
            new HalLinkListSerializer(curieProvider, mapper, messageSource));
}
 
开发者ID:mockitoo,项目名称:spring-data-rest-android,代码行数:11,代码来源:Jackson2HalModule.java


示例2: EmbeddedMapper

import org.springframework.hateoas.RelProvider; //导入依赖的package包/类
/**
 * Creates a new {@link EmbeddedMapper} for the given {@link RelProvider}, {@link CurieProvider} and flag whether to
 * prefer collection relations.
 *
 * @param relProvider          must not be {@literal null}.
 * @param curieProvider        can be {@literal null}.
 * @param preferCollectionRels
 */
public EmbeddedMapper(RelProvider relProvider, CurieProvider curieProvider, boolean preferCollectionRels) {

    Assert.notNull(relProvider, "RelProvider must not be null!");

    this.relProvider = relProvider;
    this.curieProvider = curieProvider;
    this.preferCollectionRels = preferCollectionRels;
}
 
开发者ID:mockitoo,项目名称:spring-data-rest-android,代码行数:17,代码来源:Jackson2HalModule.java


示例3: HalEmbeddedBuilder

import org.springframework.hateoas.RelProvider; //导入依赖的package包/类
/**
 * Creates a new {@link HalEmbeddedBuilder} using the given {@link RelProvider} and prefer collection rels flag.
 * 
 * @param provider can be {@literal null}.
 * @param preferCollectionRels whether to prefer to ask the provider for collection rels.
 */
public HalEmbeddedBuilder(RelProvider provider, CurieProvider curieProvider, boolean preferCollectionRels) {

	Assert.notNull(provider, "Relprovider must not be null!");

	this.provider = provider;
	this.curieProvider = curieProvider;
	this.wrappers = new EmbeddedWrappers(preferCollectionRels);
}
 
开发者ID:mockitoo,项目名称:spring-data-rest-android,代码行数:15,代码来源:HalEmbeddedBuilder.java


示例4: enablesHyperMediaSupportFromXml

import org.springframework.hateoas.RelProvider; //导入依赖的package包/类
@Test
public void enablesHyperMediaSupportFromXml() {
    assertThat(wac.getBean(RelProvider.class), is(notNullValue()));
    assertThat(wac.getBean(CurieProvider.class), is(notNullValue()));
    assertThat(wac.getBean(LinkDiscoverer.class), is(notNullValue()));
    ObjectMapper objectMapper = (ObjectMapper) wac.getBean("_halObjectMapper");
    assertThat(objectMapper, is(notNullValue()));
    assertTrue(objectMapper.getDateFormat().equals(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")));
}
 
开发者ID:howiefh,项目名称:jee-restful-web,代码行数:10,代码来源:UserControllerTest.java


示例5: BarResourceAssembler

import org.springframework.hateoas.RelProvider; //导入依赖的package包/类
public BarResourceAssembler(RelProvider relProvider) {
	this(BarController.class, relProvider);
}
 
开发者ID:Devskiller,项目名称:friendly-id,代码行数:4,代码来源:BarResourceAssembler.java


示例6: barResourceAssembler

import org.springframework.hateoas.RelProvider; //导入依赖的package包/类
@Bean
public BarResourceAssembler barResourceAssembler(RelProvider relProvider) {
	return new BarResourceAssembler(relProvider);
}
 
开发者ID:Devskiller,项目名称:friendly-id,代码行数:5,代码来源:JsonConfiguration.java


示例7: DelegatingRelProvider

import org.springframework.hateoas.RelProvider; //导入依赖的package包/类
public DelegatingRelProvider(PluginRegistry<RelProvider, Class<?>> providers) {

		Assert.notNull(providers, "RelProviders must not be null!");
		this.providers = providers;
	}
 
开发者ID:mockitoo,项目名称:spring-data-rest-android,代码行数:6,代码来源:DelegatingRelProvider.java


示例8: relProvider

import org.springframework.hateoas.RelProvider; //导入依赖的package包/类
@Bean
RelProvider relProvider()
{
	return new JsonRootRelProvider();
}
 
开发者ID:yonadev,项目名称:yona-server,代码行数:6,代码来源:CoreConfiguration.java


示例9: defaultRelProvider

import org.springframework.hateoas.RelProvider; //导入依赖的package包/类
@Bean
RelProvider defaultRelProvider() {
    return EVO_PRESENT ? new EvoInflectorRelProvider() : new DefaultRelProvider();
}
 
开发者ID:dschulten,项目名称:hydra-java,代码行数:5,代码来源:Config.java


示例10: annotationRelProvider

import org.springframework.hateoas.RelProvider; //导入依赖的package包/类
@Bean
RelProvider annotationRelProvider() {
    return new AnnotationRelProvider();
}
 
开发者ID:dschulten,项目名称:hydra-java,代码行数:5,代码来源:Config.java


示例11: setRelProvider

import org.springframework.hateoas.RelProvider; //导入依赖的package包/类
/**
 * Used to derive siren class (because Spring Hateoas rel providers normally derive rels from class names or class
 * annotations).
 *
 * @param relProvider
 *         to determine siren class
 */
public void setRelProvider(RelProvider relProvider) {
    sirenUtils.setRelProvider(relProvider);
}
 
开发者ID:dschulten,项目名称:hydra-java,代码行数:11,代码来源:SirenMessageConverter.java



注:本文中的org.springframework.hateoas.RelProvider类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java MDArtifact类代码示例发布时间:2022-05-23
下一篇:
Java ClassTailor类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap