package com.ruoyi.fuzhou.config; import com.hikvision.artemis.sdk.ArtemisHttpUtil; import com.hikvision.artemis.sdk.config.ArtemisConfig; import org.springframework.stereotype.Service; import java.util.Map; @Service public class HikConfig { private static final String host = ""; private static final String appKey = ""; private static final String appSecret = ""; public String hkpost(Map path, String body) throws Exception { ArtemisConfig artemisConfig = new ArtemisConfig(); artemisConfig.host = "10.1.10.20:443"; // artemis网关服务器ip端口 artemisConfig.appKey = "23872378"; // 秘钥appkey artemisConfig.appSecret = "aDmXhRBhZrW6ldVHrLhh";// 秘钥appSecret String contentType = "application/json"; String result = ArtemisHttpUtil.doPostStringArtemis(artemisConfig,path, body, null, null, contentType , null);// post请求application/json类型参数 return result; } }