乐趣区

关于jeecg-boot:jeecg-token获取

  • 封装
    public static String getToken(String userName,String password){
        String url = "http://localhost:8888/jeecg/rest/tokens?username="+userName+"&password="+password;

        String token= JwtHttpUtil.httpRequest(url, "POST", null);
        return token;
    }
  • 调用
    public static void main(String[] args) {String token = getToken("name","password");
    }
退出移动版