class ARestImpl extends AbstractRestImpl {
    private static final Logger LOG = LoggerFactory.getLogger(ARestImpl.class);

    @Autowired
    private RestTemplate restTemplate;

    @Autowired
    private ServiceStrategyContextHolder serviceStrategyContextHolder;

    @RequestMapping(path = "/rest", method = RequestMethod.POST)
    @SentinelResource(value = "sentinel-resource", blockHandler = "handleBlock", fallback = "handleFallback")
    public String rest(@RequestBody String value) {<FILL_FUNCTION_BODY>}

    @RequestMapping(path = "/test", method = RequestMethod.POST)
    public String test(@RequestBody String value) {
        try {
            Thread.sleep(5000);
        } catch (Exception e) {
            e.printStackTrace();
        }

        return value;
    }

    public String handleBlock(String value, BlockException e) {
        return "A server sentinel block, cause=" + e.getClass().getName() + ", rule=" + e.getRule() + ", limitApp=" + e.getRuleLimitApp() + ", value=" + value;
    }

    public String handleFallback(String value) {
        return "A server sentinel fallback, value=" + value;
    }
}

        value = doRest(value);

        // Just for testing
        ServletRequestAttributes attributes = serviceStrategyContextHolder.getRestAttributes();
        Enumeration<String> headerNames = attributes.getRequest().getHeaderNames();

        LOG.info("Header name list:");
        while (headerNames.hasMoreElements()) {
            String headerName = headerNames.nextElement();
            LOG.info("* " + headerName);
        }

        String token = attributes.getRequest().getHeader("token");
        LOG.info("Old token=" + token);

        LOG.info("New token=Token-A");

        HttpHeaders headers = new HttpHeaders();
        headers.set("token", "Token-A");

        HttpEntity<String> entity = new HttpEntity<String>(value, headers);
        value = restTemplate.postForEntity("http://discovery-springcloud-example-b/rest", entity, String.class).getBody();

        LOG.info("调用路径：{}", value);

        return value;
    
<methods>public non-sealed void <init>() ,public java.lang.String doRest(java.lang.String) <variables>private com.nepxion.discovery.plugin.framework.adapter.PluginAdapter pluginAdapter