// Path: micro-services/consumer-service/src/main/java/com/lanshiqin/consumerservice/core/remote/HelloRemote.java
// @FeignClient(name = "producer-service",fallback = HelloRemoteFallback.class)
// public interface HelloRemote {
//     /**
//      * 远程调用方法
//      * @param name 名称
//      * @return 远程调用结果
//      */
//     @RequestMapping(value = "/hello")
//     String hello(@RequestParam(value = "name") String name);
// }


import com.lanshiqin.consumerservice.core.remote.HelloRemote;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
package com.lanshiqin.consumerservice.core.controller;


/**
 * Hello控制器 测试远程调用接口
 * 将远程调用接口注入，并调用远程方法
 */
@RestController
public class HelloController {

    @Autowired
// Path: micro-services/consumer-service/src/main/java/com/lanshiqin/consumerservice/core/remote/HelloRemote.java
// @FeignClient(name = "producer-service",fallback = HelloRemoteFallback.class)
// public interface HelloRemote {
//     /**
//      * 远程调用方法
//      * @param name 名称
//      * @return 远程调用结果
//      */
//     @RequestMapping(value = "/hello")
//     String hello(@RequestParam(value = "name") String name);
// }


// Path: micro-services/consumer-service/src/main/java/com/lanshiqin/consumerservice/core/controller/HelloController.java
import com.lanshiqin.consumerservice.core.remote.HelloRemote;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

package com.lanshiqin.consumerservice.core.controller;


/**
 * Hello控制器 测试远程调用接口
 * 将远程调用接口注入，并调用远程方法
 */
@RestController
public class HelloController {

    @Autowired
    private HelloRemote helloRemote;  // 远程调用接口