Java HTTP 客户端库 Feign

码农软件 · 软件分类 · Java开发工具 · 2019-11-07 06:44:11

软件介绍

Feign 使得 Java HTTP 客户端编写更方便。

Feign 灵感来源于 Retrofit, JAXRS-2.0WebSocket,Feign 最初是为了降低统一绑定 Denominator 到 HTTP APIs 的复杂度,不管是否是 Restful 。

基础使用:

interface GitHub {
  @RequestLine("GET /repos/{owner}/{repo}/contributors")
  List<Contributor> contributors(@Param("owner") String owner, @Param("repo") String repo);
}
static class Contributor {
  String login;
  int contributions;
}
public static void main(String... args) {
  GitHub github = Feign.builder()
                       .decoder(new GsonDecoder())
                       .target(GitHub.class, "https://api.github.com");
  // Fetch and print a list of the contributors to this library.
  List<Contributor> contributors = github.contributors("netflix", "feign");
  for (Contributor contributor : contributors) {
    System.out.println(contributor.login + " (" + contributor.contributions + ")");
  }
}


本文地址:https://www.codercto.com/soft/d/18439.html

再看电商

再看电商

黄若 / 电子工业出版社 / 2014-7-1 / CNY 39.00

电商行业在中国经历了十年的高速增长。如果说十年前的网上购物是新鲜潮人的尝试的话,那么今天几亿网购人群的规模,零售市场18,000亿人民币的年交易额,正催生着一个改变人们生活习惯的全新行业。互联网正在从各个维度重新定义生产、品牌、娱乐、传播、消费,电商毫无疑问的在购物领域影响着越来越多人的生活。同时,这个行业连年亏损,顾客服务良莠不齐,也受到广泛关注。作者从地面零售到电子商务,从跨国公司高管到管理民......一起来看看 《再看电商》 这本书的介绍吧!

随机密码生成器
随机密码生成器

多种字符组合密码

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具