2021-01-27 15:15:03 +08:00
|
|
|
package com.ruoyi.demo.feign;
|
|
|
|
|
|
|
|
import com.ruoyi.demo.feign.fallback.FeignTestFallback;
|
|
|
|
import org.springframework.cloud.openfeign.FeignClient;
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
|
|
2021-05-10 15:34:17 +08:00
|
|
|
/**
|
|
|
|
* feign测试service
|
|
|
|
*
|
|
|
|
* @author Lion Li
|
|
|
|
*/
|
2021-01-27 15:15:03 +08:00
|
|
|
@FeignClient(name = "baidu",url = "http://www.baidu.com",fallback = FeignTestFallback.class)
|
|
|
|
public interface FeignTestService {
|
|
|
|
|
|
|
|
@GetMapping("/s")
|
|
|
|
String search(@RequestParam("wd") String wd);
|
|
|
|
}
|