package demo.helloconsumer;

import org.springframework.cloud.loadbalancer.annotation.LoadBalancerClient;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(value="hello-provider-service")
public interface HelloFeignService {
    @RequestMapping(method = RequestMethod.GET,
            value = "/greet/{username}")
    String sayHello(@PathVariable("username")String username);

    default String sayHello(){
        return sayHello("Stranger");
    }
}


/*********************************************************
 * 作者：孙卫琴                                   
 * 来源：《Spring Cloud Alibaba微服务开发零基础入门到实战》源代码  
 * 技术支持网址：www.javathinker.net/alibaba                    
 *********************************************************/
