2 Commits 9828faf7fc ... 202541c5be

Author SHA1 Message Date
  miloma93@163.com 202541c5be Merge remote-tracking branch 'origin/dev' into dev 4 months ago
  miloma93@163.com 81b06366af update:云台信息ip+port 4 months ago

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
      * 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
      * example sunwin2015
      */
      */
-    private String password = "sunwin2015";
+    private String password = "ubuntu123";
 
 
     /**
     /**
      * 除了协议、ip,端口后面的uri
      * 除了协议、ip,端口后面的uri

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

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