Java SDK 可通过 Access Key 初始化。您可以根据需求选择设置 AK/SK 的方法。本文为您介绍初始化的操作步骤。
智能处理支持的区域:华北 cn-north-1。
支持 3 种 AK/SK 的设置方法。
impService.setAccessKey("ak"); impService.setSecretKey("sk");
VOLC_ACCESSKEY="ak" VOLC_SECRETKEY="sk"
在本地的 ~/.volc/config 中添加如下内容:
{ "ak":"Your-AK", "sk":"Your-SK" }
package com.volcengine.example; import com.volcengine.service.imp.IImpService; import com.volcengine.service.imp.impl.ImpServiceImpl; public class Demo { public static void main(String[] args) throws Exception { IImpService impService = ImpServiceImpl.getInstance(); // call below method if you don't set ak and sk impService.setAccessKey("your ak"); impService.setSecretKey("your sk"); // then call special actions } }