标签:this client for ati auth 拼接 ping erb header
@FeignClient("user-service")
public interface UserFeignClient {
@GetMapping(value="/user/{id}",headers={"Authorization=qwer"})
User queryUserById(@PathVariable("id") Long id);
}
@Service
public class UserService {
@Autowired
private UserFeignClient userFeignClient;
public List<User> queryUserByIds(List<Long> ids) {
List<User> users = new ArrayList<>();
ids.forEach(id -> {
users.add(this.userFeignClient.queryUserById(id));
});
return users;
}
}
标签:this client for ati auth 拼接 ping erb header
原文地址:https://www.cnblogs.com/fswhq/p/13572509.html