|
|
|
@ -52,8 +52,8 @@ public class JmCommon {
|
|
|
|
|
public static final Charset UTF_8 = StandardCharsets.UTF_8;
|
|
|
|
|
|
|
|
|
|
// API访问凭证
|
|
|
|
|
protected static final String ak; // Access Key
|
|
|
|
|
protected static final String sk; // Secret Key
|
|
|
|
|
protected static final String ak="AKLTZjVlOGU1NzA1YWZkNDExMzkzYzY5YTNlOTRmMTMxODg"; // Access Key
|
|
|
|
|
protected static final String sk="WkdabU9UTXdNVEJpTmpWbE5HVTJZVGxtTnpWbU5XSTBaRGN5TW1NMk5tRQ"; // Secret Key
|
|
|
|
|
public static Prop PropKit; // 配置文件工具
|
|
|
|
|
// 获取项目根目录路径
|
|
|
|
|
protected static String projectRoot = System.getProperty("user.dir").replace("\\", "/") + "/dsAiSupport";
|
|
|
|
@ -65,12 +65,6 @@ public class JmCommon {
|
|
|
|
|
* 加载配置文件并初始化URL编码器
|
|
|
|
|
*/
|
|
|
|
|
static {
|
|
|
|
|
//加载配置文件
|
|
|
|
|
String configFile = "application_{?}.yaml".replace("{?}", getEnvPrefix());
|
|
|
|
|
PropKit = new YamlProp(configFile);
|
|
|
|
|
ak = PropKit.get("JiMeng.ak"); // 从配置文件获取Access Key
|
|
|
|
|
sk = PropKit.get("JiMeng.sk"); // 从配置文件获取Secret Key
|
|
|
|
|
|
|
|
|
|
// 初始化URL编码器,设置不需要编码的字符
|
|
|
|
|
int i;
|
|
|
|
|
for (i = 97; i <= 122; ++i) { // a-z
|
|
|
|
|