1、数据库PG切换为达梦的修改版本。
This commit is contained in:
@@ -4,6 +4,7 @@ import com.typesafe.config.Config;
|
||||
import com.typesafe.config.ConfigFactory;
|
||||
import java.io.File;
|
||||
import com.typesafe.config.ConfigValueFactory;
|
||||
import java.nio.charset.Charset;
|
||||
|
||||
import java.util.Map;
|
||||
public class AppConfig {
|
||||
@@ -101,6 +102,17 @@ public class AppConfig {
|
||||
return config.getInt("syslog.buffer.size");
|
||||
}
|
||||
|
||||
/**
|
||||
* syslog 消息字符编码,默认 GBK(国内安全设备普遍使用 GBK)
|
||||
* 配置示例: syslog.charset=GBK
|
||||
*/
|
||||
public static Charset getSyslogCharset() {
|
||||
if (config.hasPath("syslog.charset")) {
|
||||
return Charset.forName(config.getString("syslog.charset"));
|
||||
}
|
||||
return Charset.forName("GBK");
|
||||
}
|
||||
|
||||
// app service 配置
|
||||
public static String getAppServieDeviceId() {
|
||||
return config.getString("app.service.device_id");
|
||||
|
||||
Reference in New Issue
Block a user