diff --git a/pigx-common/pigx-common-core/src/main/resources/logback-spring.xml b/pigx-common/pigx-common-core/src/main/resources/logback-spring.xml index eb1721e59..afba91f2a 100644 --- a/pigx-common/pigx-common-core/src/main/resources/logback-spring.xml +++ b/pigx-common/pigx-common-core/src/main/resources/logback-spring.xml @@ -52,7 +52,7 @@ - + diff --git a/pigx-register/src/main/java/com/alibaba/nacos/PigxNacosApplication.java b/pigx-register/src/main/java/com/alibaba/nacos/PigxNacosApplication.java index f125fbfda..9b257f589 100755 --- a/pigx-register/src/main/java/com/alibaba/nacos/PigxNacosApplication.java +++ b/pigx-register/src/main/java/com/alibaba/nacos/PigxNacosApplication.java @@ -16,7 +16,7 @@ package com.alibaba.nacos; -import com.alibaba.nacos.core.utils.Constants; +import com.alibaba.nacos.console.config.ConfigConstant; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.scheduling.annotation.EnableScheduling; @@ -32,10 +32,10 @@ import org.springframework.scheduling.annotation.EnableScheduling; public class PigxNacosApplication { public static void main(String[] args) { - System.setProperty("server.tomcat.basedir", "logs"); - System.setProperty("nacos.home", "pigx-config"); - System.setProperty("user.home", "logs"); - System.setProperty(Constants.STANDALONE_MODE_PROPERTY_NAME, "true"); + System.setProperty(ConfigConstant.TOMCAT_DIR, "logs"); + System.setProperty(ConfigConstant.NACOS_HOME, "pigx-config"); + System.setProperty(ConfigConstant.USER_HOME, "logs"); + System.setProperty(ConfigConstant.STANDALONE_MODE, "true"); SpringApplication.run(PigxNacosApplication.class, args); } } diff --git a/pigx-register/src/main/java/com/alibaba/nacos/console/config/ConfigConstant.java b/pigx-register/src/main/java/com/alibaba/nacos/console/config/ConfigConstant.java new file mode 100644 index 000000000..0b8977412 --- /dev/null +++ b/pigx-register/src/main/java/com/alibaba/nacos/console/config/ConfigConstant.java @@ -0,0 +1,27 @@ +package com.alibaba.nacos.console.config; + +/** + * @author lengleng + * @date 2019-04-19 + */ +public interface ConfigConstant { + /** + * The System property name of Standalone mode + */ + String STANDALONE_MODE = "nacos.standalone"; + + /** + * 环境变量 + */ + String USER_HOME = "user.home"; + + /** + * nacos 家目录 + */ + String NACOS_HOME = "nacos.home"; + + /** + * tomcat 目录 + */ + String TOMCAT_DIR = "server.tomcat.basedir"; +}