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();

    }

  • 相关阅读:
    【转】清理vs2008中的最近打开项目
    GridView的RowCommand事件传两个或以上参数
    ASP.NET中获取DataList中的控件
    判断导入的Excel中的数据
    ASP.NET中获取GridView中的控件
    Oracle拼接序列
    asp.net常用到的字符串处理
    文本框只能输入数字代码
    Tomcat多域名,虚拟目录配置
    Windows2008 部署tomcat后,局域网访问不了的问题
  • 原文地址:https://www.cnblogs.com/lize1215/p/8510285.html
Copyright © 2011-2022 走看看