|
@@ -1,25 +0,0 @@
|
|
|
-package com.diagbot.client;
|
|
|
-
|
|
|
-import com.diagbot.client.hystrix.UserServiceHystrix;
|
|
|
-import com.diagbot.dto.RespDTO;
|
|
|
-import com.diagbot.entity.User;
|
|
|
-import org.springframework.cloud.openfeign.FeignClient;
|
|
|
-import org.springframework.web.bind.annotation.PathVariable;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestHeader;
|
|
|
-
|
|
|
-
|
|
|
-/**
|
|
|
- * @Description: 调用用户服务
|
|
|
- * @author: gaodm
|
|
|
- * @time: 2018/8/6 9:52
|
|
|
- */
|
|
|
-@FeignClient(value = "user-service", fallback = UserServiceHystrix.class)
|
|
|
-public interface UserServiceClient {
|
|
|
-
|
|
|
- @PostMapping(value = "/user/{username}")
|
|
|
- RespDTO<User> getUser(@RequestHeader(value = "Authorization") String token, @PathVariable("username") String username);
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-
|