mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-09-24 07:19:46 +08:00
正式发布 1.0.0
This commit is contained in:
@ -9,6 +9,11 @@ import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* feign测试controller
|
||||
*
|
||||
* @author Lion Li
|
||||
*/
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RestController
|
||||
@RequestMapping("/feign/test")
|
||||
|
@ -5,6 +5,11 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
/**
|
||||
* feign测试service
|
||||
*
|
||||
* @author Lion Li
|
||||
*/
|
||||
@FeignClient(name = "baidu",url = "http://www.baidu.com",fallback = FeignTestFallback.class)
|
||||
public interface FeignTestService {
|
||||
|
||||
|
@ -5,6 +5,11 @@ import com.ruoyi.demo.feign.FeignTestService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* feign测试fallback
|
||||
*
|
||||
* @author Lion Li
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class FeignTestFallback implements FeignTestService {
|
||||
|
Reference in New Issue
Block a user