From c3745f4fd52756f573287fa3d7dc6b536166799e Mon Sep 17 00:00:00 2001
From: liuhaonan <31457034@qq.com>
Date: 星期二, 13 九月 2022 16:41:09 +0800
Subject: [PATCH] changes

---
 ximon-admin/src/main/java/com/sandu/ximon/admin/config/VnnoxConstant.java |   37 +++++++++++++++++++++++++++++++++----
 1 files changed, 33 insertions(+), 4 deletions(-)

diff --git a/ximon-admin/src/main/java/com/sandu/ximon/admin/config/VnnoxConstant.java b/ximon-admin/src/main/java/com/sandu/ximon/admin/config/VnnoxConstant.java
index 8b3176b..09aae19 100644
--- a/ximon-admin/src/main/java/com/sandu/ximon/admin/config/VnnoxConstant.java
+++ b/ximon-admin/src/main/java/com/sandu/ximon/admin/config/VnnoxConstant.java
@@ -1,8 +1,12 @@
 package com.sandu.ximon.admin.config;
 
 import com.google.gson.Gson;
+import org.springframework.beans.factory.InitializingBean;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
 
-public class VnnoxConstant {
+@Component
+public class VnnoxConstant implements InitializingBean {
 
     //  VNNOX MINIO save bucket  suffix(companyId)
     public static final String MINIO_PREFIX = "vnnox.";
@@ -18,13 +22,38 @@
     public static final Long SCREEN_SHOT_TIMEOUT = 30 * 60L;
     public static final Long STATUS_TIME = 3 * 60 * 60L;
 
-    public static final String NOTIFY_URL = "http://112.74.63.130:20017/serv/vnnox/progress";
-    public static final String SCREEN_SHOT_NOTIFY_URL = "http://112.74.63.130:20017/serv/vnnox/screenshot"; // TODO   瑕佹敼
-    public static final String STATUS_NOTIFY_URL = "http://112.74.63.130:20017/serv/vnnox/asyncStatus"; // TODO   瑕佹敼
+    @Value("${nova-conf.notify-url}")
+    private String notifyUrl;
+    @Value("${nova-conf.screen-shot-notify-url}")
+    private String screenShotNotifyUrl;
+    @Value("${nova-conf.status-notify-url}")
+    private String statusNotifyUrl;
+
+
+    public static String NOTIFY_URL;
+    public static String SCREEN_SHOT_NOTIFY_URL;
+    public static String STATUS_NOTIFY_URL;
+    public static String STATUS_NOTIFY_URL1;
 
     public static final String username = "zhxm";
     public static final String password = "xm2512209.";
 
     public static final Gson GSON = new Gson();
 
+
+    @Override
+    public void afterPropertiesSet() throws Exception {
+        NOTIFY_URL = notifyUrl;
+
+        SCREEN_SHOT_NOTIFY_URL = screenShotNotifyUrl;
+
+        STATUS_NOTIFY_URL = statusNotifyUrl;
+        System.out.println(STATUS_NOTIFY_URL);
+
+
+    }
+
+    public static void main(String[] args) {
+        System.out.println(VnnoxConstant.SCREEN_SHOT_NOTIFY_URL);
+    }
 }
\ No newline at end of file

--
Gitblit v1.9.3