// Path: eurekaCustomer/src/main/java/me/helllp/demo/eurekaCustomer/service/FeignService.java
// @FeignClient(value="EUREKACLIENT", configuration=FeignConfiguration.class)
// public interface FeignService {
// 	@RequestMapping(value = "/hello",method = RequestMethod.GET)
//     String sayHiUseFeign(@RequestParam(value = "name") String name);
// }
// 
// Path: eurekaCustomer/src/main/java/me/helllp/demo/eurekaCustomer/service/HelloService.java
// @Service
// public class HelloService {
// 	private static final String SERVICE_NAME = "EUREKACLIENT";
// 	
// 	@Autowired
// 	RestTemplate restTemplate;
// 	
// 	@Autowired
// 	private LoadBalancerClient loadBalancerClient;
// 
//     public String helloService(String name) {
// 		ServiceInstance serviceInstance = this.loadBalancerClient.choose(SERVICE_NAME);
// 		System.out.println("服务主机：" + serviceInstance.getHost());
// 		System.out.println("服务端口：" + serviceInstance.getPort());
// 		
//     	//	通过服务名来访问
//         return restTemplate.getForObject("http://" + SERVICE_NAME + "/hello?name="+name,String.class);
//     }
// 
// }


import me.helllp.demo.eurekaCustomer.service.FeignService;
import me.helllp.demo.eurekaCustomer.service.HelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

package me.helllp.demo.eurekaCustomer.web;



@RestController
public class HelloController {
	@Autowired
	HelloService helloService;
	
	@Autowired

// Path: eurekaCustomer/src/main/java/me/helllp/demo/eurekaCustomer/service/FeignService.java
// @FeignClient(value="EUREKACLIENT", configuration=FeignConfiguration.class)
// public interface FeignService {
// 	@RequestMapping(value = "/hello",method = RequestMethod.GET)
//     String sayHiUseFeign(@RequestParam(value = "name") String name);
// }
// 
// Path: eurekaCustomer/src/main/java/me/helllp/demo/eurekaCustomer/service/HelloService.java
// @Service
// public class HelloService {
// 	private static final String SERVICE_NAME = "EUREKACLIENT";
// 	
// 	@Autowired
// 	RestTemplate restTemplate;
// 	
// 	@Autowired
// 	private LoadBalancerClient loadBalancerClient;
// 
//     public String helloService(String name) {
// 		ServiceInstance serviceInstance = this.loadBalancerClient.choose(SERVICE_NAME);
// 		System.out.println("服务主机：" + serviceInstance.getHost());
// 		System.out.println("服务端口：" + serviceInstance.getPort());
// 		
//     	//	通过服务名来访问
//         return restTemplate.getForObject("http://" + SERVICE_NAME + "/hello?name="+name,String.class);
//     }
// 
// }


// Path: eurekaCustomer/src/main/java/me/helllp/demo/eurekaCustomer/web/HelloController.java
import me.helllp.demo.eurekaCustomer.service.FeignService;
import me.helllp.demo.eurekaCustomer.service.HelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

package me.helllp.demo.eurekaCustomer.web;



@RestController
public class HelloController {
	@Autowired
	HelloService helloService;
	
	@Autowired

	FeignService feignService;
