zoukankan      html  css  js  c++  java
  • feign skd api

    package com.guohuai.mmp.investor.staffcheck.http;

    import org.springframework.beans.factory.annotation.Value;
    import org.springframework.context.annotation.Bean;
    import org.springframework.context.annotation.Configuration;

    import com.guohuai.basic.component.sms.UTF8Encoder;
    import feign.Feign;
    import feign.Logger.Level;
    import feign.slf4j.Slf4jLogger;

    @lombok.Data
    @Configuration
    public class HTTPSdk {

    @Value("${employee.verification.host:localhost}")
    private String host;

    @Bean
    public HTTPApi httpSdk() {
    System.out.println(host);
    return Feign.builder().encoder(new UTF8Encoder()).logger(new Slf4jLogger()).logLevel(Level.FULL).target(HTTPApi.class, "http://" + this.host + "/");
    }
    }

    //employee.verification.host=localhost:80

    ----------------------------------------------------------------------------------

    package com.guohuai.mmp.investor.staffcheck.http;

    import org.springframework.web.bind.annotation.RequestParam;

    import feign.Param;
    import feign.RequestLine;

    public interface HTTPApi {

    @RequestLine("POST /employee/verification")
    public String verification(@Param("ctfType") String ctfType,
    @Param("personalId") String personalId);
    /**
    * 查询总条数
    * @return
    */
    @RequestLine("POST /employee/total")
    public String total();

    /**
    * 查询总条数
    * @return
    */
    @RequestLine("POST /employee/list")
    public String list(@Param("page") String page, @Param("pageSize") String pageSize);



    /**
    * OAJson接口调用获取json数据
    * @return
    */
    @RequestLine("POST /mimosa/oa/jsonmethod")
    public String OaInterface2GetJson();


    @RequestLine("GET /oaorganization/api/oa/sso/users/all")
    public String OaOrganizationJsonData();

    }

  • 相关阅读:
    什么是HTTP?
    什么是OSI的第7层
    OSI7层模型
    什么是WAF?
    什么是Mirai僵尸网络
    什么是僵尸网络?
    洛谷 P1208 [USACO1.3]混合牛奶 Mixing Milk
    如何给数组的结构体排序 关于sort用法
    洛谷 P1803 凌乱的yyy / 线段覆盖
    洛谷 P1007 独木桥
  • 原文地址:https://www.cnblogs.com/lize1215/p/8510285.html
Copyright © 2011-2022 走看看