Annotation Interface TemplateParams
This annotation is used on resource controllers that are designed to provide clients with link relations as URI templates
e.g. If the controller sets annotation
@RequestMapping and @TemplateParams like below
@RequestMapping("/samplepath")
@TemplateParams({"param1","param2"})
The link relation pointing to this resource would be built like "hrefTemplate":"{contextRoot}/samplepath{?param1,param2}"
Besides the params in @TemplateParams, The params in @RequestMapping would also be included in the href template of the controller link.
e.g. If the controller sets annotation @RequestMapping and @TemplateParams like below
@RequestMapping(path="/samplepath",params={"param1","param2"})
@TemplateParams({"param3","param4"})
The link relation pointing to this resource would be built like "hrefTemplate":"{contextRoot}/samplepath{?param1,param2,param3,param4}"
If both params in @TemplateParams and the one in @RequestMapping are empty, the link builder would build this controller link as "href"
e.g. If the controller sets annotation like below
@RequestMapping(path="/samplepath")
The link relation pointing to this resource would be built like "href":"{contextRoot}/samplepath"-
Optional Element Summary
Optional Elements
-
Element Details
-
value
The params to be included in the href template- Returns:
- parameter name array
- Default:
- {}
-
params
The params to be included in the href template- Returns:
- parameter value array
- Default:
- {}
-