Giter Site home page Giter Site logo

inspire-demo's People

Contributors

genshenwang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

inspire-demo's Issues

Ch3_InterfaceAuth代码仓库中、ApiRequest类中方法代码有问题

Ch3_InterfaceAuth代码仓库中、ApiRequest类中方法代码有问题建议使用如下代码:

public static String concatUrl(String url, Map<String, String> params){ if(StringUtils.isEmpty(url)){ return ""; }else if(params == null || params.isEmpty() ){ return url.trim(); }else{ StringBuffer sb = new StringBuffer(""); Set<String> keys = params.keySet(); for (String key : keys) { sb.append(key).append("=").append(params.get(key)).append("&"); } sb.deleteCharAt(sb.length() - 1); url = url.trim(); int length = url.length(); int index = url.indexOf("?"); if(index > -1){//url说明有问号 if((length - 1) == index){//url最后一个符号为?,如:http://wwww.baidu.com? url += sb.toString(); }else{//情况为:http://wwww.baidu.com?aa=11 url += "&" + sb.toString(); } }else{//url后面没有问号,如:http://wwww.baidu.com url += "?" + sb.toString(); } return url; } }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.