Parcourir la source

切换至新配置中心

deason il y a 4 ans
Parent
commit
182604aec8

+ 3 - 17
src/main/java/cn/com/qmth/examcloud/ws/WebSocketApp.java

@@ -1,7 +1,6 @@
 package cn.com.qmth.examcloud.ws;
 package cn.com.qmth.examcloud.ws;
 
 
-import cn.com.qmth.examcloud.web.bootstrap.AppBootstrap;
-import cn.com.qmth.examcloud.web.support.SpringContextHolder;
+import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
 import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
 import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
 import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
@@ -19,7 +18,6 @@ public class WebSocketApp {
         if (null == runtimeLevel) {
         if (null == runtimeLevel) {
             System.setProperty("log.commonLevel", "INFO");
             System.setProperty("log.commonLevel", "INFO");
         }
         }
-
     }
     }
 
 
     /**
     /**
@@ -30,20 +28,8 @@ public class WebSocketApp {
      * @author WANGWEI
      * @author WANGWEI
      */
      */
     public static void main(String[] args) throws Exception {
     public static void main(String[] args) throws Exception {
-
-        AppBootstrap.run(WebSocketApp.class, args);
-
-        test();
-    }
-
-    /**
-     * 测试方法
-     *
-     * @author WANGWEI
-     */
-    private static void test() {
-        Tester tester = SpringContextHolder.getBean(Tester.class);
-        tester.test();
+        // AppBootstrap.run(WebSocketApp.class, args);
+        SpringApplication.run(WebSocketApp.class, args);
     }
     }
 
 
 }
 }

+ 5 - 7
src/main/resources/application.properties

@@ -1,8 +1,6 @@
 spring.profiles.active=dev
 spring.profiles.active=dev
-
-examcloud.startup.startupCode=8010
-examcloud.startup.configCenterHost=192.168.10.39
-examcloud.startup.configCenterPort=9999
-examcloud.startup.appCode=WS
-
-
+sys.config.center.enabled=true
+sys.config.center.address=192.168.10.39:8888
+sys.config.center.namespace=examcloud
+sys.config.center.appCode=WS
+sys.config.center.secretKey=