Selaa lähdekoodia

配置中心接管配置

WANG 6 vuotta sitten
vanhempi
commit
13a52ebd2f

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

@@ -2,7 +2,6 @@ package cn.com.qmth.examcloud.core.basic.starter;
 
 import org.slf4j.MDC;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.autoconfigure.domain.EntityScan;
@@ -30,6 +29,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
 import cn.com.qmth.examcloud.commons.base.logging.ExamCloudLog;
 import cn.com.qmth.examcloud.commons.base.logging.ExamCloudLogFactory;
 import cn.com.qmth.examcloud.commons.base.logging.SLF4JImpl;
+import cn.com.qmth.examcloud.commons.web.boot.ExamCloudApp;
 import cn.com.qmth.examcloud.commons.web.redis.RedisClient;
 import cn.com.qmth.examcloud.commons.web.redis.RedisClientImpl;
 import cn.com.qmth.examcloud.commons.web.support.CustomResponseErrorHandler;
@@ -63,7 +63,7 @@ public class CoreBasicApp {
 
 		OrgProperty.init();
 
-		SpringApplication.run(CoreBasicApp.class, args);
+		ExamCloudApp.run(CoreBasicApp.class, "basic", args);
 	}
 
 	@Bean

+ 2 - 0
examcloud-core-basic-starter/src/main/resources/application.properties

@@ -33,3 +33,5 @@ info.app=${spring.application.name}
 
 $log.level.default=error
 
+$config.server.port=config-host
+