Browse Source

Merge remote-tracking branch 'origin/lingshan_master' into lingshan_master

master
wxz 2 years ago
parent
commit
d8a8a45472
  1. 9
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/net/TCCCClientUtils.java

9
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/net/TCCCClientUtils.java

@ -21,12 +21,15 @@ public class TCCCClientUtils {
private static String SECRETKEY = "ymRuDJI8mCRUUPFvQqCPQME0c2MbfaM2";
private static String ENDPOINT ="ccc.ap-shanghai.tencentcloudapi.com";
public static String getToken() {
try {
Credential cred = new Credential(SECRETID, SECRETKEY);
// 实例化一个http选项,可选的,没有特殊需求可以跳过
HttpProfile httpProfile = new HttpProfile();
httpProfile.setEndpoint("ccc.ap-shanghai.tencentcloudapi.com");
httpProfile.setEndpoint(ENDPOINT);
// 实例化一个client选项,可选的,没有特殊需求可以跳过
ClientProfile clientProfile = new ClientProfile();
clientProfile.setHttpProfile(httpProfile);
@ -46,4 +49,8 @@ public class TCCCClientUtils {
return e.toString();
}
}
public static void main(String[] args) {
getToken();
}
}

Loading…
Cancel
Save