Ver Fonte

update:云台信息ip+port

miloma93@163.com há 4 meses atrás
pai
commit
81b06366af

BIN
db/标记软件数据库.xlsx


+ 2 - 2
src/main/java/com/sw/patroleditor/domain/model/BodyRequestModel.java

@@ -12,7 +12,7 @@ public class BodyRequestModel {
     /**
      * example 192.168.1.64
      */
-    private String ip = "192.168.1.64";
+    private String ip = "192.168.1.75";
 
     /**
      * 端口
@@ -32,7 +32,7 @@ public class BodyRequestModel {
      * 原密码
      * example sunwin2015
      */
-    private String password = "sunwin2015";
+    private String password = "ubuntu123";
 
     /**
      * 除了协议、ip,端口后面的uri

+ 1 - 2
src/main/java/com/sw/patroleditor/util/HkHttpUtils.java

@@ -95,14 +95,13 @@ public class HkHttpUtils {
      * @throws Exception
      */
     public String doBodyPut(BodyRequestModel config) throws Exception {
-        String entity = config.getEntity();
         CredentialsProvider credsProvider = new BasicCredentialsProvider();
         AuthScope favourite_digest_realm = new AuthScope(config.getIp(), config.getPort());
         UsernamePasswordCredentials usernamePasswordCredentials = new UsernamePasswordCredentials(config.getUsername(), config.getPassword());
         credsProvider.setCredentials(favourite_digest_realm, usernamePasswordCredentials);
         CloseableHttpClient httpclient = HttpClients.custom().setDefaultCredentialsProvider(credsProvider).build();
         HttpPut HttpPut = new HttpPut(config.getAgreement() + "://" + config.getIp() + ":" + config.getPort() + config.getUri());
-        HttpPut.setEntity(new StringEntity(entity, "UTF-8"));
+        HttpPut.setEntity(new StringEntity(config.getEntity(), "UTF-8"));
         CloseableHttpResponse responseBody = httpclient.execute(HttpPut);
         HttpEntity responseEntity = responseBody.getEntity();
         if (responseEntity != null) {