mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-08 20:49:00 +08:00
🔊 日志级别修改、配置名 常量化
This commit is contained in:
1 parent
0aa43ddb80
commit
2e667b1ff4
3 files changed
+33
-6
No files matched your search
@@ -52,7 +52,7 @@
|
||||
</logger>
|
||||
|
||||
<!--nacos 心跳 INFO 屏蔽-->
|
||||
<logger name="com.alibaba.nacos" level="WARN">
|
||||
<logger name="com.alibaba.nacos" level="OFF">
|
||||
<appender-ref ref="error"/>
|
||||
</logger>
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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";
|
||||
}
|
||||
Reference in new issue
Block a user