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");
    }

你可能感兴趣的:(jeecg, token获取)