本文整理匯總了Java中org.springframework.hateoas.TemplateVariables類的典型用法代碼示例。如果您正苦於以下問題:Java TemplateVariables類的具體用法?Java TemplateVariables怎麽用?Java TemplateVariables使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
TemplateVariables類屬於org.springframework.hateoas包,在下文中一共展示了TemplateVariables類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: InitializrMetadataV2JsonMapper
import org.springframework.hateoas.TemplateVariables; //導入依賴的package包/類
public InitializrMetadataV2JsonMapper() {
this.templateVariables = new TemplateVariables(
new TemplateVariable("dependencies",
TemplateVariable.VariableType.REQUEST_PARAM),
new TemplateVariable("packaging",
TemplateVariable.VariableType.REQUEST_PARAM),
new TemplateVariable("javaVersion",
TemplateVariable.VariableType.REQUEST_PARAM),
new TemplateVariable("language",
TemplateVariable.VariableType.REQUEST_PARAM),
new TemplateVariable("edorasoneVersion",
TemplateVariable.VariableType.REQUEST_PARAM),
new TemplateVariable("groupId",
TemplateVariable.VariableType.REQUEST_PARAM),
new TemplateVariable("artifactId",
TemplateVariable.VariableType.REQUEST_PARAM),
new TemplateVariable("version",
TemplateVariable.VariableType.REQUEST_PARAM),
new TemplateVariable("name", TemplateVariable.VariableType.REQUEST_PARAM),
new TemplateVariable("shortName", TemplateVariable.VariableType.REQUEST_PARAM),
new TemplateVariable("description",
TemplateVariable.VariableType.REQUEST_PARAM),
new TemplateVariable("packageName",
TemplateVariable.VariableType.REQUEST_PARAM));
}
示例2: InitializrMetadataV2JsonMapper
import org.springframework.hateoas.TemplateVariables; //導入依賴的package包/類
public InitializrMetadataV2JsonMapper() {
this.templateVariables = new TemplateVariables(
new TemplateVariable("dependencies",
TemplateVariable.VariableType.REQUEST_PARAM),
new TemplateVariable("packaging",
TemplateVariable.VariableType.REQUEST_PARAM),
new TemplateVariable("javaVersion",
TemplateVariable.VariableType.REQUEST_PARAM),
new TemplateVariable("language",
TemplateVariable.VariableType.REQUEST_PARAM),
new TemplateVariable("bootVersion",
TemplateVariable.VariableType.REQUEST_PARAM),
new TemplateVariable("groupId",
TemplateVariable.VariableType.REQUEST_PARAM),
new TemplateVariable("artifactId",
TemplateVariable.VariableType.REQUEST_PARAM),
new TemplateVariable("version",
TemplateVariable.VariableType.REQUEST_PARAM),
new TemplateVariable("name", TemplateVariable.VariableType.REQUEST_PARAM),
new TemplateVariable("description",
TemplateVariable.VariableType.REQUEST_PARAM),
new TemplateVariable("packageName",
TemplateVariable.VariableType.REQUEST_PARAM));
}
示例3: InitializrMetadataV21JsonMapper
import org.springframework.hateoas.TemplateVariables; //導入依賴的package包/類
public InitializrMetadataV21JsonMapper() {
this.dependenciesVariables = new TemplateVariables(
new TemplateVariable("edorasoneVersion",
TemplateVariable.VariableType.REQUEST_PARAM)
);
}
示例4: createPaginatedResourceLink
import org.springframework.hateoas.TemplateVariables; //導入依賴的package包/類
private Link createPaginatedResourceLink(Link link) {
String href = link.getHref();
UriComponents components = UriComponentsBuilder.fromUriString(href).build();
TemplateVariables variables = resolver.getPaginationTemplateVariables(null, components);
return new Link(new UriTemplate(href, variables), link.getRel());
}
示例5: InitializrMetadataV21JsonMapper
import org.springframework.hateoas.TemplateVariables; //導入依賴的package包/類
public InitializrMetadataV21JsonMapper() {
this.dependenciesVariables = new TemplateVariables(
new TemplateVariable("bootVersion",
TemplateVariable.VariableType.REQUEST_PARAM)
);
}