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

Java CurieProvider类代码示例

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

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



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

示例1: curieProvider

import org.springframework.hateoas.hal.CurieProvider; //导入依赖的package包/类
@Bean
@ConditionalOnBean(DocsMvcEndpoint.class)
@ConditionalOnMissingBean(CurieProvider.class)
@ConditionalOnProperty(prefix = "endpoints.docs.curies", name = "enabled", matchIfMissing = false)
public DefaultCurieProvider curieProvider(ServerProperties server,
		ManagementServerProperties management, DocsMvcEndpoint endpoint) {
	String path = management.getContextPath() + endpoint.getPath()
			+ "/#spring_boot_actuator__{rel}";
	if (server.getPort().equals(management.getPort()) && management.getPort() != 0) {
		path = server.getPath(path);
	}
	return new DefaultCurieProvider("boot", new UriTemplate(path));
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:14,代码来源:EndpointWebMvcHypermediaManagementContextConfiguration.java


示例2: enablesHyperMediaSupportFromXml

import org.springframework.hateoas.hal.CurieProvider; //导入依赖的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


示例3: curieProvider

import org.springframework.hateoas.hal.CurieProvider; //导入依赖的package包/类
@Bean
@ConditionalOnBean(ActuatorDocsEndpoint.class)
@ConditionalOnMissingBean(CurieProvider.class)
@ConditionalOnProperty(prefix = "endpoints.docs.curies", name = "enabled", matchIfMissing = false)
public DefaultCurieProvider curieProvider(ServerProperties server,
		ManagementServerProperties management, ActuatorDocsEndpoint endpoint) {
	String path = management.getContextPath() + endpoint.getPath()
			+ "/#spring_boot_actuator__{rel}";
	if (server.getPort() == management.getPort() && management.getPort() != null
			&& management.getPort() != 0) {
		path = server.getPath(path);
	}
	return new DefaultCurieProvider("boot", new UriTemplate(path));
}
 
开发者ID:Nephilim84,项目名称:contestparser,代码行数:15,代码来源:EndpointWebMvcHypermediaManagementContextConfiguration.java


示例4: UserResourceAssembler

import org.springframework.hateoas.hal.CurieProvider; //导入依赖的package包/类
private UserResourceAssembler(UserResourceRepresentation representation, CurieProvider curieProvider,
		Optional<UUID> requestingUserId, Optional<UUID> requestingDeviceId,
		Optional<PinResetRequestController> pinResetRequestController)
{
	super(UserController.class, UserResource.class);
	this.representation = representation;
	this.curieProvider = curieProvider;
	this.pinResetRequestController = pinResetRequestController;
	this.requestingUserId = requestingUserId;
	this.requestingDeviceId = requestingDeviceId;
}
 
开发者ID:yonadev,项目名称:yona-server,代码行数:12,代码来源:UserController.java


示例5: MessageActionResource

import org.springframework.hateoas.hal.CurieProvider; //导入依赖的package包/类
public MessageActionResource(CurieProvider curieProvider, MessageActionDto messageAction, GoalIdMapping goalIdMapping,
		MessageController messageController)
{
	super(messageAction);
	this.curieProvider = curieProvider;
	this.goalIdMapping = goalIdMapping;
	this.messageController = messageController;
}
 
开发者ID:yonadev,项目名称:yona-server,代码行数:9,代码来源:MessageController.java


示例6: MessageResourceAssembler

import org.springframework.hateoas.hal.CurieProvider; //导入依赖的package包/类
public MessageResourceAssembler(CurieProvider curieProvider, GoalIdMapping goalIdMapping,
		MessageController messageController)
{
	super(MessageController.class, MessageDto.class);
	this.curieProvider = curieProvider;
	this.goalIdMapping = goalIdMapping;
	this.messageController = messageController;
}
 
开发者ID:yonadev,项目名称:yona-server,代码行数:9,代码来源:MessageController.java


示例7: curieProvider

import org.springframework.hateoas.hal.CurieProvider; //导入依赖的package包/类
public @Bean
CurieProvider curieProvider() {
	return new DefaultCurieProvider(CURIE_NAMESPACE, new UriTemplate("/docs/html5/{rel}.html"));
}
 
开发者ID:sw360,项目名称:sw360rest,代码行数:5,代码来源:Sw360ResourceServer.java


示例8: curieProvider

import org.springframework.hateoas.hal.CurieProvider; //导入依赖的package包/类
@Bean
public CurieProvider curieProvider() {
    return new DefaultCurieProvider("api", new UriTemplate("http://localhost/rels/{rel}"));
}
 
开发者ID:howiefh,项目名称:jee-restful-web,代码行数:5,代码来源:HypermediaConfiguration.java


示例9: createAllDevicesCollectionResource

import org.springframework.hateoas.hal.CurieProvider; //导入依赖的package包/类
public static Resources<DeviceResource> createAllDevicesCollectionResource(CurieProvider curieProvider, UUID userId,
		Set<DeviceBaseDto> devices)
{
	return new Resources<>(new DeviceResourceAssembler(curieProvider, userId).toResources(devices),
			DeviceController.getAllDevicesLinkBuilder(userId).withSelfRel());
}
 
开发者ID:yonadev,项目名称:yona-server,代码行数:7,代码来源:DeviceController.java


示例10: DeviceResource

import org.springframework.hateoas.hal.CurieProvider; //导入依赖的package包/类
public DeviceResource(CurieProvider curieProvider, UUID userId, DeviceBaseDto device)
{
	super(device);
	this.curieProvider = curieProvider;
	this.userId = userId;
}
 
开发者ID:yonadev,项目名称:yona-server,代码行数:7,代码来源:DeviceController.java


示例11: DeviceResourceAssembler

import org.springframework.hateoas.hal.CurieProvider; //导入依赖的package包/类
public DeviceResourceAssembler(CurieProvider curieProvider, UUID userId)
{
	super(DeviceController.class, DeviceResource.class);
	this.curieProvider = curieProvider;
	this.userId = userId;
}
 
开发者ID:yonadev,项目名称:yona-server,代码行数:7,代码来源:DeviceController.java


示例12: createAllBuddiesCollectionResource

import org.springframework.hateoas.hal.CurieProvider; //导入依赖的package包/类
public static Resources<BuddyResource> createAllBuddiesCollectionResource(CurieProvider curieProvider, UUID userId,
		Set<BuddyDto> allBuddiesOfUser)
{
	return new Resources<>(new BuddyResourceAssembler(curieProvider, userId).toResources(allBuddiesOfUser),
			getAllBuddiesLinkBuilder(userId).withSelfRel());
}
 
开发者ID:yonadev,项目名称:yona-server,代码行数:7,代码来源:BuddyController.java


示例13: BuddyResource

import org.springframework.hateoas.hal.CurieProvider; //导入依赖的package包/类
public BuddyResource(CurieProvider curieProvider, UUID userId, BuddyDto buddy)
{
	super(buddy);
	this.curieProvider = curieProvider;
	this.userId = userId;
}
 
开发者ID:yonadev,项目名称:yona-server,代码行数:7,代码来源:BuddyController.java


示例14: BuddyResourceAssembler

import org.springframework.hateoas.hal.CurieProvider; //导入依赖的package包/类
public BuddyResourceAssembler(CurieProvider curieProvider, UUID userId)
{
	super(BuddyController.class, BuddyResource.class);
	this.curieProvider = curieProvider;
	this.userId = userId;
}
 
开发者ID:yonadev,项目名称:yona-server,代码行数:7,代码来源:BuddyController.java


示例15: UserResource

import org.springframework.hateoas.hal.CurieProvider; //导入依赖的package包/类
public UserResource(CurieProvider curieProvider, UserResourceRepresentation representation, UserDto user)
{
	super(user);
	this.curieProvider = curieProvider;
	this.representation = representation;
}
 
开发者ID:yonadev,项目名称:yona-server,代码行数:7,代码来源:UserController.java


示例16: createPublicUserInstance

import org.springframework.hateoas.hal.CurieProvider; //导入依赖的package包/类
public static UserResourceAssembler createPublicUserInstance(CurieProvider curieProvider)
{
	return new UserResourceAssembler(UserResourceRepresentation.MINIMAL, curieProvider, Optional.empty(),
			Optional.empty(), Optional.empty());
}
 
开发者ID:yonadev,项目名称:yona-server,代码行数:6,代码来源:UserController.java


示例17: createMinimalInstance

import org.springframework.hateoas.hal.CurieProvider; //导入依赖的package包/类
public static UserResourceAssembler createMinimalInstance(CurieProvider curieProvider, UUID requestingUserId)
{
	return new UserResourceAssembler(UserResourceRepresentation.MINIMAL, curieProvider, Optional.of(requestingUserId),
			Optional.empty(), Optional.empty());
}
 
开发者ID:yonadev,项目名称:yona-server,代码行数:6,代码来源:UserController.java


示例18: createInstanceForBuddy

import org.springframework.hateoas.hal.CurieProvider; //导入依赖的package包/类
public static UserResourceAssembler createInstanceForBuddy(CurieProvider curieProvider, UUID requestingUserId)
{
	return new UserResourceAssembler(UserResourceRepresentation.BUDDY_USER, curieProvider, Optional.of(requestingUserId),
			Optional.empty(), Optional.empty());
}
 
开发者ID:yonadev,项目名称:yona-server,代码行数:6,代码来源:UserController.java


示例19: createInstanceForOwnUser

import org.springframework.hateoas.hal.CurieProvider; //导入依赖的package包/类
public static UserResourceAssembler createInstanceForOwnUser(CurieProvider curieProvider, UUID requestingUserId,
		Optional<UUID> requestingDeviceId, PinResetRequestController pinResetRequestController)
{
	return new UserResourceAssembler(UserResourceRepresentation.OWN_USER, curieProvider, Optional.of(requestingUserId),
			requestingDeviceId, Optional.of(pinResetRequestController));
}
 
开发者ID:yonadev,项目名称:yona-server,代码行数:7,代码来源:UserController.java


示例20: curieProvider

import org.springframework.hateoas.hal.CurieProvider; //导入依赖的package包/类
@Bean
public CurieProvider curieProvider()
{
	return new DefaultCurieProvider("yona", new UriTemplate("http://dev.yona.nu/rels/{rel}"));
}
 
开发者ID:yonadev,项目名称:yona-server,代码行数:6,代码来源:CoreConfiguration.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java MenuScene类代码示例发布时间:2022-05-23
下一篇:
Java RepositoryLinksResource类代码示例发布时间: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