package cn.xbz.zipkinclientsleuth;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

@RestController
public class TestController {

    @Autowired
    private RestTemplate restTemplate;

    @RequestMapping("/test")
    public String test(String user) {
        return restTemplate.getForObject("http://zipkin-service/hello?user=" + user, String.class);
    }
}