All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.diboot.devtools.v2.O0OOOO00O0OO000O Maven / Gradle / Ivy

The newest version!
/**
 * Copyright (c) dibo.ltd, https://www.dibo.ltd, https://www.diboot.com
 * 

* ---- 版权声明 ---- * Diboot相关商标、软件著作权、专利等全部知识产权隶属于苏州帝博信息技术有限公司。 * Diboot devtools 非开源项目,如您有devtools相关定制化需求,请至官网(https://www.dibo.ltd)联系帝博信息商务。 * * 《中华人民共和国刑法》规定:破坏计算机信息系统罪,处五年以下有期徒刑或者拘役;后果特别严重的,处五年以上有期徒刑。 * 侵犯知识产权罪:处三年以下有期徒刑、拘役或管制,并处罚金;情节特别严重的,处三年以上七年以下有期徒刑,并处罚金。 * * 任何尝试破解、破坏devtools、侵犯diboot知识产权的行为,我们将不惜一切代价追究到底! *

*/ package com.diboot.devtools.v2; import com.diboot.core.exception.BusinessException; import com.diboot.core.util.ContextHelper; import com.diboot.core.util.V; import com.diboot.core.vo.JsonResult; import com.diboot.core.vo.Status; import lombok.extern.slf4j.Slf4j; import org.springframework.http.*; import org.springframework.http.converter.FormHttpMessageConverter; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.web.client.RestTemplate; import java.nio.charset.StandardCharsets; import java.util.Base64; import java.util.Map; @Slf4j @Deprecated() public class O0OOOO00O0OO000O extends O0OOO0O0O0OOO000 { private static String ll111l1l1l11l = null; private static String l11lll111l1ll = null; private static Long l1111111l111l = null; private static OOOO00O0OO0O0O00 l1l1l11l1l1l1; @Deprecated() protected static JsonResult l1l1l1111ll1lll(String l11l1lllllll, HttpMethod llllllll11l1, MediaType lllll11llll1, Object l111l11111ll) { try { String l11111ll11l1 = l1lll1l11111l1l(); HttpHeaders l111ll11l1l1 = new HttpHeaders(); if (lllll11llll1 == null) { l111ll11l1l1.setContentType(MediaType.APPLICATION_JSON); } else { l111ll11l1l1.setContentType(lllll11llll1); } l111ll11l1l1.add(OOO0OO00O00O00OO.l11llll1ll11ll1("QXV0aG9yaXphdGlvbg=="), l11lll111l1ll + " " + l11111ll11l1); HttpEntity l11l1ll11l1l = new HttpEntity(l111l11111ll, l111ll11l1l1); RestTemplate l111l111ll1l = ll1111l1lllll1l(); ResponseEntity l1l1l1ll1ll1 = l111l111ll1l.exchange(l11l1lllllll, llllllll11l1, l11l1ll11l1l, JsonResult.class); return l1l1l1ll1ll1.getBody(); } catch (Exception e) { log.error(OOO0OO00O00O00OO.l11llll1ll11ll1("6K+35rGC5o6l5Y+j5byC5bi4OiB7fQ=="), e.getMessage()); return null; } } @Deprecated() protected static String l1lll1l11111l1l() { if (V.notEmpty(ll111l1l1l11l) && V.notEmpty(l1111111l111l) && System.currentTimeMillis() < l1111111l111l) { return ll111l1l1l11l; } if (l1l1l11l1l1l1 == null) { l1l1l11l1l1l1 = ContextHelper.getBean(OOOO00O0OO0O0O00.class); } Map ll111111l1l1 = ll11l1l11ll1111(l1l1l11l1l1l1); ll111l1l1l11l = String.valueOf(ll111111l1l1.get(OOO0OO00O00O00OO.l11llll1ll11ll1("YWNjZXNzX3Rva2Vu"))); l11lll111l1ll = String.valueOf(ll111111l1l1.get(OOO0OO00O00O00OO.l11llll1ll11ll1("dG9rZW5fdHlwZQ=="))); Long ll1ll1l11l1l = Long.valueOf(String.valueOf(ll111111l1l1.get(OOO0OO00O00O00OO.l11llll1ll11ll1("ZXhwaXJlc19pbg==")))); l1111111l111l = System.currentTimeMillis() + ll1ll1l11l1l * 1000; return ll111l1l1l11l; } @Deprecated() protected static Map ll11l1l11ll1111(OOOO00O0OO0O0O00 l1l1l11l1l1l1) { HttpHeaders l11111111ll1 = new HttpHeaders(); l11111111ll1.setContentType(MediaType.APPLICATION_FORM_URLENCODED); String l111ll11111l = l1l1l11l1l1l1.getCloudAuthClientId(); String l1lll11l1ll1 = l1l1l11l1l1l1.getCloudAuthClientSecret(); byte[] ll1llll111l1 = (l111ll11111l + ":" + l1lll11l1ll1).getBytes(StandardCharsets.UTF_8); String l111l1l11lll = Base64.getEncoder().encodeToString(ll1llll111l1); l11111111ll1.add(HttpHeaders.AUTHORIZATION, OOO0OO00O00O00OO.l11llll1ll11ll1("QmFzaWMg") + l111l1l11lll); MultiValueMap l111l1l1llll = new LinkedMultiValueMap(); l111l1l1llll.add(OOO0OO00O00O00OO.l11llll1ll11ll1("Z3JhbnRfdHlwZQ=="), OOO0OO00O00O00OO.l11llll1ll11ll1("cGFzc3dvcmQ=")); l111l1l1llll.add(OOO0OO00O00O00OO.l11llll1ll11ll1("dXNlcm5hbWU="), l1l1l11l1l1l1.getCloudAuthUsername()); l111l1l1llll.add(OOO0OO00O00O00OO.l11llll1ll11ll1("cGFzc3dvcmQ="), l1l1l11l1l1l1.getCloudAuthPassword()); l11111111ll1.setContentType(MediaType.APPLICATION_FORM_URLENCODED); HttpEntity> lll11lll11ll = new HttpEntity<>(l111l1l1llll, l11111111ll1); RestTemplate l1llll1lll1l = ll1111l1lllll1l(); l1llll1lll1l.getMessageConverters().add(new FormHttpMessageConverter()); ResponseEntity l1l1l1l11l1l = l1llll1lll1l.postForEntity(l1l1l11l1l1l1.l111l1111ll1ll1() + OOO0OO00O00O00OO.l11llll1ll11ll1("YXV0aC1jZW50ZXIvb2F1dGgvdG9rZW4="), lll11lll11ll, Map.class); Map l111l1l1l1ll = l1l1l1l11l1l.getBody(); if (V.isEmpty(l111l1l1l1ll)) { throw new BusinessException(Status.FAIL_OPERATION, OOO0OO00O00O00OO.l11llll1ll11ll1("6K+35rGC5pyN5Yqh5Yet6K+B5aSx6LSl77yM6K+35qOA5p+lY2xvdWTnm7jlhbPphY3nva7pobk=")); } return l111l1l1l1ll; } @Deprecated() protected static String l1lllllll11ll11() { if (l1l1l11l1l1l1 == null) { l1l1l11l1l1l1 = ContextHelper.getBean(OOOO00O0OO0O0O00.class); } return l1l1l11l1l1l1.l1ll1llll1ll1l1(); } }