使用TSF SDK 1.19.0-Greenwich-RELEASE,在consumer demo中自定义标签代码为:
@RequestMapping(value = "/echo-rest/{str}", method = RequestMethod.GET)
public String restProvider(@PathVariable String str,
@RequestParam(required = false) String tagName,
@RequestParam(required = false) String tagValue) {
if (!StringUtils.isEmpty(tagName)) {
TsfContext.putTag(tagName, tagValue);
TsfContext.putCustomMetadata(new CustomMetadata(tagName, tagValue));
}
return restTemplate.getForObject("http://provider-demo/echo/" + str, String.class);
}
访问的URL:http://xxxx:18083/echo-rest/test123?tagName=user&tagValue=tom
TSF控制台设置服务consumer鉴权白名单,自定义标签:key=user,value=tom
但是访问被拒绝403,不知道哪里出了问题
相似问题