Explorar o código

切换至新配置中心

deason %!s(int64=4) %!d(string=hai) anos
pai
achega
b50be35cee

+ 3 - 13
examcloud-core-basic-starter/src/main/java/cn/com/qmth/examcloud/core/basic/starter/CoreBasicApp.java

@@ -5,10 +5,10 @@ import cn.com.qmth.examcloud.core.basic.dao.enums.OrgProperty;
 import cn.com.qmth.examcloud.core.basic.service.LoginRuleService;
 import cn.com.qmth.examcloud.core.basic.service.cache.AppCache;
 import cn.com.qmth.examcloud.support.filestorage.FileStorageUtil;
-import cn.com.qmth.examcloud.web.bootstrap.AppBootstrap;
 import cn.com.qmth.examcloud.web.jpa.DataIntegrityViolationTransverter;
 import cn.com.qmth.examcloud.web.support.SpringContextHolder;
 import org.apache.logging.log4j.ThreadContext;
+import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.autoconfigure.domain.EntityScan;
 import org.springframework.boot.autoconfigure.web.servlet.MultipartAutoConfiguration;
@@ -53,22 +53,12 @@ public class CoreBasicApp {
      * @author WANGWEI
      */
     public static void main(String[] args) throws Exception {
-        AppBootstrap.run(CoreBasicApp.class, args);
+        // AppBootstrap.run(CoreBasicApp.class, args);
+        SpringApplication.run(CoreBasicApp.class, args);
 
         initCache();
         FileStorageUtil.initYunSite();
         FileStorageUtil.initYunClient();
-        // test();
-    }
-
-    /**
-     * 测试方法
-     *
-     * @author WANGWEI
-     */
-    private static void test() {
-        Tester tester = SpringContextHolder.getBean(Tester.class);
-        tester.test();
     }
 
     /**

+ 5 - 7
examcloud-core-basic-starter/src/main/resources/application.properties

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